/// <summary> /// 订阅命令执行后的事件。 /// </summary> /// <param name="callback">事件的回调函数。</param> /// <returns>当前 <see cref="IDbExecutor"/></returns> public IDbExecutor SubExecuted(ExecutedEventHandler callback) { if (callback == null) { throw new ArgumentNullException(nameof(callback)); } Executed += callback; return(this); }
public CommandBinding(ICommand command, ExecutedEventHandler executed, CanExecuteEventHandler canExecute) { this.Command = command; if (executed != null) { this.Executed += new ExecutedEventHandler(executed); } if (canExecute != null) { this.CanExecute += new CanExecuteEventHandler(canExecute); } }
public CommandBinding(ICommand command, ExecutedEventHandler executed) : this(command, executed, null) { }