To .NET 5 (lot of refactoring)
[master-thesis.git] / Parasitemia / ParasitemiaUI / CommandLineArguments.fs
1 module ParasitemiaUI.CommandLineArguments
2
3 open System.Windows
4
5 open ParasitemiaUIControls
6
7 let showWindow (parent : Window) =
8 let win = CommandLineArgumentsWindow ()
9 win.Owner <- parent
10
11 win.Left <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Width / 2.
12 win.Top <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Top) + parent.ActualHeight / 2. - win.Height / 2.
13
14 win.txtCommandLineArguments.Text <- Utils.argsHelp
15
16 win.butClose.Click.AddHandler (fun obj args -> win.Close ())
17
18 win.ShowDialog () |> ignore
19