imageSourceSelection.menuZoom50X.Click.AddHandler(fun obj args -> imageSourceSelection.txtResolution.Text <- "230000")
imageSourceSelection.menuZoom100X.Click.AddHandler(fun obj args -> imageSourceSelection.txtResolution.Text <- "460000")
- imageSourceSelection.butDPICalculator.Click.AddHandler(fun obj args ->
- match DPICalculator.showWindow win.Root with
+ imageSourceSelection.butPPICalculator.Click.AddHandler(fun obj args ->
+ match PPICalculator.showWindow win.Root with
| Some resolution -> imageSourceSelection.txtResolution.Text <- resolution.ToString()
| None -> ())
| Some results ->
for id, cells in results do
state.SetResult (int id) cells
-
- win.Root.Dispatcher.Invoke(fun () ->
- win.stackSourceImagesSelection.IsEnabled <- true
- win.butStart.IsEnabled <- true
- win.butClose.Content <- "Close"
- updateSourceImages ())
-
Logger.Log.User("All analyses terminated successfully")
atLeastOneAnalysisPerformed <- true
analysisPerformed <- true
- | None -> ())
+ | None ->
+ Logger.Log.User("Analysis aborted")
+
+ win.Root.Dispatcher.Invoke(fun () ->
+ win.progress.Value <- if maybeResults.IsSome then 100. else 0.
+ win.stackSourceImagesSelection.IsEnabled <- true
+ win.butStart.IsEnabled <- true
+ win.butClose.Content <- "Close"
+ updateSourceImages ()))
} |> Async.Start
| _ -> ())
lock monitor (fun () ->
if not analysisPerformed
then
+ // To cancel the current analysis if one is running on the next call to the progress function.
analysisCancelled <- true
atLeastOneAnalysisPerformed)