8c643b7f844ca068c40167cd550bb4d721345d91
1
module ParasitemiaUI.About
5 open System.Windows.Controls
6 open System.Diagnostics
8 let showWindow (parent
: Window) =
9 let win = Views.AboutWindow ()
12 win.Left <- (if parent
.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Width / 2.
13 win.Top <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Top) + parent.ActualHeight / 2. - win.Height / 2.
15 let version = System.Reflection.Assembly.GetEntryAssembly().GetName().Version
16 let txtVersion = sprintf
" %d.%d.%d" version.Major version.Minor version.Revision
17 win.txtAbout
.Inlines.FirstInline.ElementEnd.InsertTextInRun txtVersion
20 Navigation.RequestNavigateEventHandler (
22 Process.Start (ProcessStartInfo args
.Uri.AbsoluteUri) |> ignore
26 win.linkHESSO
.RequestNavigate.AddHandler navigateTo;
27 win.linkCHUV
.RequestNavigate.AddHandler navigateTo;
28 win.linkGBurri
.RequestNavigate.AddHandler navigateTo;
31 win.txtAbout
.Inlines.FirstInline.ElementEnd.InsertTextInRun " - DEBUG"
34 win.butClose
.Click.AddHandler (fun obj args
-> win.Close ())
36 win.ShowDialog () |> ignore