예제 #1
0
 private void InvokeExecuting(CancelCommandEventArgs args)
 {
     if (Executing != null)
     {
         Executing(this, args);
     }
 }
예제 #2
0
        public void DoExecute(object param)
        {
            CancelCommandEventArgs args = new CancelCommandEventArgs()
            {
                Parameter = param, Cancel = false
            };

            InvokeExecuting(args);

            if (args.Cancel)
            {
                return;
            }

            InvokeAction(param);

            InvokeExecuted(new CommandEventArgs()
            {
                Parameter = param
            });
        }