コード例 #1
0
ファイル: RelayCommand.cs プロジェクト: catontheway/Ragnarok
        /// <summary>
        /// コマンドの実行可能状態を調べます。
        /// </summary>
        public bool CanExecute(object parameter = null)
        {
            if (this.canExecute == null)
            {
                return(true);
            }

            var e = new CanExecuteRelayEventArgs(this, parameter);

            this.canExecute(this, e);
            return(e.CanExecute);
        }
コード例 #2
0
ファイル: RelayCommand.cs プロジェクト: leontius/Ragnarok
        /// <summary>
        /// コマンドの実行可能状態を調べます。
        /// </summary>
        public bool CanExecute()
        {
            if (this.canExecute == null)
            {
                return(true);
            }

            var e = new CanExecuteRelayEventArgs(this);

            this.canExecute(this, e);
            return(e.CanExecute);
        }
コード例 #3
0
ファイル: RelayCommand.cs プロジェクト: JuroGandalf/Ragnarok
        /// <summary>
        /// コマンドの実行可能状態を調べます。
        /// </summary>
        public bool CanExecute()
        {
            if (this.canExecute == null)
            {
                return true;
            }

            var e = new CanExecuteRelayEventArgs(this);
            this.canExecute(this, e);
            return e.CanExecute;
        }