Remove the dependency to ViewModule
[master-thesis.git] / Parasitemia / ParasitemiaUI / Utils.fs
index 4dcb7d4..927e441 100644 (file)
@@ -103,4 +103,18 @@ let argsHelp =
     "Interactive mode:\n" +
     (sprintf "  %s [<document-file>] [--debug]\n" programName) +
     "    <document-file> : a PIAZ file to automatically open at startup\n" +
-    "    --debug : output information like intermediate images in the current directory (it takes more CPU and memory)"
\ No newline at end of file
+    "    --debug : output information like intermediate images in the current directory (it takes more CPU and memory)"
+
+open System
+open System.Windows
+
+type FunCommand (execute : obj -> unit, canExecute : obj -> bool) =
+    let canExecuteChanged = Event<EventHandler, EventArgs> ()
+
+    interface Input.ICommand with
+        [<CLIEvent>]
+        member this.CanExecuteChanged = canExecuteChanged.Publish
+
+        member this.CanExecute (param : obj) = canExecute param
+
+        member this.Execute (param : obj) = execute param
\ No newline at end of file