let showWindow (parent: Window) =
let win = Views.AboutWindow()
win.Root.Owner <- parent
- win.Root.Left <- parent.Left + parent.ActualWidth / 2. - win.Root.Width / 2.
- win.Root.Top <- parent.Top + parent.ActualHeight / 2. - win.Root.Height / 2.
+
+ 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.
let version = System.Reflection.Assembly.GetEntryAssembly().GetName().Version
let txtVersion = sprintf " %d.%d.%d" version.Major version.Minor version.Revision
let showWindow (parent: Window) (state: State.State) : bool =
let win = Views.AnalysisWindow()
win.Root.Owner <- parent
- win.Root.Left <- parent.Left + parent.ActualWidth / 2. - win.Root.Width / 2.
- win.Root.Top <- parent.Top + parent.ActualHeight / 2. - win.Root.Height / 2.
+ 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.
let logListener =
{ new Logger.IListener with
[Registry]
Root: HKCR; Subkey: ".piaz"; ValueType: string; ValueName: ""; ValueData: "Parasitemia"; Flags: uninsdeletevalue; Tasks: ParasitemiaFileAssociation
Root: HKCR; Subkey: "Parasitemia"; ValueType: string; ValueName: ""; ValueData: "Parasitemia Prog"; Flags: uninsdeletekey
-Root: HKCR; Subkey: "OptInvest\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\ParasitemiaUI.exe,0"
+Root: HKCR; Subkey: "Parasitemia\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\ParasitemiaUI.exe,0"
+Root: HKCR; Subkey: "Parasitemia\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\ParasitemiaUI.exe"" ""%1"""
[Run]
Filename: "{app}/ParasitemiaUI.exe"; Flags: nowait postinstall runasoriginaluser; Description: "Launch Parasitemia"
\ No newline at end of file