コード例 #1
0
ファイル: DbExecutor.cs プロジェクト: yufengfei/Aoite
        /// <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);
        }
コード例 #2
0
ファイル: CommandBinding.cs プロジェクト: zhangzheng12/EApp
        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);
            }
        }
コード例 #3
0
ファイル: CommandBinding.cs プロジェクト: daywrite/EApp
        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);
            }
        }
コード例 #4
0
ファイル: CommandBinding.cs プロジェクト: zhangzheng12/EApp
 public CommandBinding(ICommand command, ExecutedEventHandler executed) : this(command, executed, null)
 {
 }
コード例 #5
0
ファイル: CommandBinding.cs プロジェクト: daywrite/EApp
 public CommandBinding(ICommand command, ExecutedEventHandler executed)
     : this(command, executed, null)
 {
 }