To .NET 5 (lot of refactoring)
[master-thesis.git] / Parasitemia / ParasitemiaUI / Analysis.fs
index 9a6047e..43987d1 100644 (file)
@@ -1,25 +1,18 @@
 module ParasitemiaUI.Analysis
 
 open System
-open System.IO
 open System.Linq
 open System.Windows
-open System.Windows.Media
-open System.Windows.Markup
-open System.Windows.Shapes
 open System.Windows.Controls
-open System.Diagnostics
-open Microsoft.Win32 // For the common dialogs.
-
-open Emgu.CV.WPF
 
+open ParasitemiaUIControls
 open ParasitemiaCore.UnitsOfMeasure
 open ParasitemiaCore.Config
 
 open Types
 
 let showWindow (parent : Window) (state : State.State) : bool =
-    let win = Views.AnalysisWindow ()
+    let win = AnalysisWindow ()
     win.Owner <- parent
     win.Left <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Width / 2.
     win.Top <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Top) + parent.ActualHeight / 2. - win.Height / 2.
@@ -54,7 +47,7 @@ let showWindow (parent : Window) (state : State.State) : bool =
         win.stackSourceImagesSelection.Children.Clear ()
         let width = int win.stackSourceImagesSelection.ActualWidth
         for srcImg in state.SourceImages do
-            let imageSourceSelection = Views.ImageSourceSelection (Tag = srcImg, Margin = Thickness 3.)
+            let imageSourceSelection = ImageSourceSelection (Tag = srcImg, Margin = Thickness 3.)
             imageSourceSelection.Tag <- srcImg
 
             imageSourceSelection.txtImageNumber.Text <- string srcImg.RomanNum
@@ -95,7 +88,7 @@ let showWindow (parent : Window) (state : State.State) : bool =
     // Get the new parameters for each image. If an error occurs then 'None' is returned and a message box is displayed.
     // The boolean is 'true' if the image is selected (checked).
     let getInputImagesParameters () : (SourceImage * bool * Parameters) list option =
-        let sourceImagesControls = win.stackSourceImagesSelection.Children |> Seq.cast<Views.ImageSourceSelection>
+        let sourceImagesControls = win.stackSourceImagesSelection.Children |> Seq.cast<ImageSourceSelection>
         let parameters =
             seq {
                 for srcImgCtrl in sourceImagesControls do