Пример #1
0
 public void Execute(object parameter)
 {
     if (Action != null)
     {
         Action();
     }
     if (Click != null)
     {
         Click(this, EventArgs.Empty);
     }
     if (InternalCommand != null && InternalCommand.CanExecute(parameter))
     {
         InternalCommand.Execute(parameter);
     }
 }
Пример #2
0
 private void InternalExecuteCommand()
 {
     if (Command != null)
     {
         if (Command.CanExecute(CommandParameter))
         {
             Command.Execute(CommandParameter);
             InternalCommand?.Execute(null);
         }
     }
     else
     {
         InternalCommand?.Execute(null);
     }
 }