X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaUI%2FAbout.fs;h=452573a11bf8fe0f1062dad28b9c2e7876bf74f1;hp=908ccd5d17efdceac5e45fe7e3f56235a8fe49e2;hb=b87b35b922551f122228df1fd9c530bbb807935a;hpb=2e3cd07dd099944059ef5e7a7f5ef57ffe3d677b diff --git a/Parasitemia/ParasitemiaUI/About.fs b/Parasitemia/ParasitemiaUI/About.fs index 908ccd5..452573a 100644 --- a/Parasitemia/ParasitemiaUI/About.fs +++ b/Parasitemia/ParasitemiaUI/About.fs @@ -8,12 +8,12 @@ open System.Windows.Shapes open System.Windows.Controls open System.Diagnostics -let showWindow (parent: Window) = +let showWindow (parent : Window) = let win = Views.AboutWindow() - win.Root.Owner <- parent + win.Owner <- parent - win.Root.Left <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Root.Width / 2. - win.Root.Top <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Top) + parent.ActualHeight / 2. - win.Root.Height / 2. + win.Left <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Width / 2. + win.Top <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Top) + parent.ActualHeight / 2. - win.Height / 2. let version = System.Reflection.Assembly.GetEntryAssembly().GetName().Version let txtVersion = sprintf " %d.%d.%d" version.Major version.Minor version.Revision @@ -31,7 +31,7 @@ let showWindow (parent: Window) = win.txtAbout.Inlines.FirstInline.ElementEnd.InsertTextInRun(" - DEBUG") #endif - win.butClose.Click.AddHandler(fun obj args -> win.Root.Close()) + win.butClose.Click.AddHandler(fun obj args -> win.Close()) - win.Root.ShowDialog() |> ignore + win.ShowDialog() |> ignore