Remove the dependency to ViewModule
[master-thesis.git] / Parasitemia / ParasitemiaUI / GUI.fs
index 69ae1f9..3b67894 100644 (file)
@@ -590,7 +590,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
     // Save.
     win.InputBindings.Add (
         Input.KeyBinding (
-            ViewModule.FunCommand ((fun obj -> saveCurrentDocument ()), (fun obj -> true)),
+            Utils.FunCommand ((fun obj -> saveCurrentDocument ()), (fun obj -> true)),
             Input.KeyGesture (Input.Key.S, Input.ModifierKeys.Control)
         )
     ) |> ignore
@@ -598,7 +598,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
     // Save as.
     win.InputBindings.Add (
         Input.KeyBinding (
-            ViewModule.FunCommand ((fun obj -> saveCurrentDocumentAsNewFile ()), (fun obj -> true)),
+            Utils.FunCommand ((fun obj -> saveCurrentDocumentAsNewFile ()), (fun obj -> true)),
             Input.KeyGesture (Input.Key.S, Input.ModifierKeys.Control ||| Input.ModifierKeys.Shift)
         )
     ) |> ignore
@@ -606,7 +606,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
     // Open.
     win.InputBindings.Add (
         Input.KeyBinding (
-            ViewModule.FunCommand ((fun obj -> askLoadFile ()), (fun obj -> true)),
+            Utils.FunCommand ((fun obj -> askLoadFile ()), (fun obj -> true)),
             Input.KeyGesture (Input.Key.O, Input.ModifierKeys.Control)
         )
     ) |> ignore
@@ -614,7 +614,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
     // New file.
     win.InputBindings.Add (
         Input.KeyBinding (
-            ViewModule.FunCommand ((fun obj -> newFile ()), (fun obj -> true)),
+            Utils.FunCommand ((fun obj -> newFile ()), (fun obj -> true)),
             Input.KeyGesture (Input.Key.N, Input.ModifierKeys.Control)
         )
     ) |> ignore
@@ -622,7 +622,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
     // Export results.
     win.InputBindings.Add (
         Input.KeyBinding (
-            ViewModule.FunCommand ((fun obj -> exportResults ()), (fun obj -> true)),
+            Utils.FunCommand ((fun obj -> exportResults ()), (fun obj -> true)),
             Input.KeyGesture (Input.Key.E, Input.ModifierKeys.Control)
         )
     ) |> ignore
@@ -630,7 +630,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
     // Import an image.
     win.InputBindings.Add (
         Input.KeyBinding (
-            ViewModule.FunCommand ((fun obj -> importImage ()), (fun obj -> true)),
+            Utils.FunCommand ((fun obj -> importImage ()), (fun obj -> true)),
             Input.KeyGesture (Input.Key.A, Input.ModifierKeys.Control)
         )
     ) |> ignore
@@ -638,7 +638,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
     // Show analysis dialog.
     win.InputBindings.Add (
         Input.KeyBinding (
-            ViewModule.FunCommand ((fun obj -> showAnalysisWindow ()), (fun obj -> state.SourceImages.Count () > 0)),
+            Utils.FunCommand ((fun obj -> showAnalysisWindow ()), (fun obj -> state.SourceImages.Count () > 0)),
             Input.KeyGesture (Input.Key.Y, Input.ModifierKeys.Control)
         )
     ) |> ignore
@@ -646,7 +646,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
     // Toggle RBC highlight.
     win.InputBindings.Add (
         Input.KeyBinding (
-            ViewModule.FunCommand (
+            Utils.FunCommand (
                 (
                     fun obj ->
                         win.menuHightlightRBC.IsChecked <- not win.menuHightlightRBC.IsChecked