- " --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
+
+// Inspired by https://github.com/fsprojects/FSharp.ViewModule/blob/master/src/FSharp.ViewModule/FunCommand.fs
+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