Add an about window.
[master-thesis.git] / Parasitemia / Parasitemia / GUI / Analysis.fs
index ccca1b4..7d72e72 100644 (file)
@@ -23,8 +23,7 @@ let showWindow (parent: Window) (state: State.State) : bool =
     window.Root.Left <- parent.Left + parent.ActualWidth / 2. - window.Root.Width / 2.
     window.Root.Top <- parent.Top + parent.ActualHeight / 2. - window.Root.Height / 2.
 
-    let ctrl (name: string): 'a =
-        window.Root.FindName(name) :?> 'a
+    let ctrl (name: string): 'a = window.Root.FindName(name) :?> 'a
 
     let butClose: Button = ctrl "butClose"
     let butStart: Button = ctrl "butStart"
@@ -70,8 +69,8 @@ let showWindow (parent: Window) (state: State.State) : bool =
             imageSourceSelection.lblDateLastAnalysis.Content <- if srcImg.dateLastAnalysis.Ticks = 0L then "<Never>" else srcImg.dateLastAnalysis.ToString()
 
             imageSourceSelection.txtResolution.Text <- srcImg.config.Parameters.resolution.ToString()
-            imageSourceSelection.menuZoom50X.Click.AddHandler(fun obj args -> imageSourceSelection.txtResolution.Text <- "200000"; updateResolution ())
-            imageSourceSelection.menuZoom100X.Click.AddHandler(fun obj args -> imageSourceSelection.txtResolution.Text <- "400000"; updateResolution ())
+            imageSourceSelection.menuZoom50X.Click.AddHandler(fun obj args -> imageSourceSelection.txtResolution.Text <- "230000"; updateResolution ())
+            imageSourceSelection.menuZoom100X.Click.AddHandler(fun obj args -> imageSourceSelection.txtResolution.Text <- "460000"; updateResolution ())
 
             imageSourceSelection.txtResolution.PreviewTextInput.AddHandler(fun obj args ->
                 let text = imageSourceSelection.txtResolution.Text + args.Text
@@ -121,7 +120,7 @@ let showWindow (parent: Window) (state: State.State) : bool =
                                 butClose.Content <- "Close"
                                 updateSourceImages ())
 
-                            Utils.log "Analysis terminated successfully"
+                            Utils.log "All analyses terminated successfully"
                             atLeastOneAnalysisPerformed <- true
                             analysisPerformed <- true)
             } |> Async.Start)
@@ -134,9 +133,4 @@ let showWindow (parent: Window) (state: State.State) : bool =
         if not analysisPerformed
             then
                 analysisCancelled <- true
-        atLeastOneAnalysisPerformed)
-
-
-    (*let results = ImageAnalysis.doMultipleAnalysis (state.SourceImages |> Seq.map (fun srcImg -> string srcImg.num, srcImg.img) |> Seq.toList) defaultConfig
-    for id, rbcRadius, cells in results do
-        state.SetResult (int id) rbcRadius cells*)
\ No newline at end of file
+        atLeastOneAnalysisPerformed)
\ No newline at end of file