void ICommand.Execute(object parameter) { if (parameter == null) { throw new ArgumentNullException("parameter"); } this.Execute(ToolCommand.GetGestureData(parameter, true)); }
private static ToolCommand EnsureCommand(ref ToolCommand command, string name) { if (command == null) { command = new ToolCommand(name); } return(command); }
public ToolCommandBinding(ToolCommand command) { if (command == null) { throw new ArgumentNullException("command"); } this.Command = command; }
bool ICommand.CanExecute(object parameter) { GestureData gestureData = ToolCommand.GetGestureData(parameter, false); if (gestureData == null) { return(false); } return(this.CanExecute(gestureData)); }
public ToolCommandBinding(ToolCommand command, ExecutedToolEventHandler executedToolEventHandler) { if (command == null) { throw new ArgumentNullException("command"); } if (executedToolEventHandler == null) { throw new ArgumentNullException("executedToolEventHandler"); } this.Execute += executedToolEventHandler; this.Command = command; }