示例#1
0
 public void RaiseCommand()
 {
     if (!string.IsNullOrEmpty(Command))
     {
         ICommandContainer container = Container as ICommandContainer;
         if (container != null)
         {
             CommandEventArgs e = new CommandEventArgs(Command, this, null);
             container.RaiseCommand(e);
         }
     }
 }
示例#2
0
 public virtual void RaiseCommand(CommandEventArgs e)
 {
     if (Command != null)
     {
         Command(this, e);
     }
     if (!e.Handled)
     {
         ICommandContainer container = this.Container as ICommandContainer;
         if (container != null)
         {
             container.RaiseCommand(e);
         }
     }
 }