X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaUI%2FDPICalculator.fs;h=697bbef3e9d7be3bc93040af90eed9987b4ff5e6;hp=2cdc184aa36555d2364351841d1c7dff86be67ca;hb=95f9edf71456c8bf89a91850800f66efc2c9d4da;hpb=d247f3a07ca3c7b192d8c2381ea85ba731fcc359 diff --git a/Parasitemia/ParasitemiaUI/DPICalculator.fs b/Parasitemia/ParasitemiaUI/DPICalculator.fs index 2cdc184..697bbef 100644 --- a/Parasitemia/ParasitemiaUI/DPICalculator.fs +++ b/Parasitemia/ParasitemiaUI/DPICalculator.fs @@ -2,19 +2,15 @@ open System open System.Windows -open System.Windows.Media -open System.Windows.Markup -open System.Windows.Shapes -open System.Windows.Controls -open System.Diagnostics +open ParasitemiaUIControls open ParasitemiaCore.Types open ParasitemiaCore.UnitsOfMeasure open Types let showWindow (parent : Window) : int option = - let win = Views.PPICalculatorWindow () + let win = PPICalculatorWindow () win.Owner <- parent win.Left <- parent.Left + parent.ActualWidth / 2. - win.Width / 2. win.Top <- parent.Top + parent.ActualHeight / 2. - win.Height / 2. @@ -30,7 +26,7 @@ let showWindow (parent : Window) : int option = let { w = w; h = h } = win.cmbSensorSize.SelectedValue :?> SensorSize let ratio = h / w - let parseDouble txt errorMess = match Double.TryParse (txt) with true, value -> Success value | _ -> Fail errorMess + let parseDouble (txt : string) (errorMess : string) = match Double.TryParse (txt) with true, value -> Success value | _ -> Fail errorMess match (result {