Пример #1
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);
         }
     }
 }
Пример #2
0
 public override void RaiseCommand(CommandEventArgs e)
 {
     e.Index = ItemIndex;
     if (e.Data == null) e.Data = Item;
     base.RaiseCommand(e);
 }
Пример #3
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);
         }
     }
 }
Пример #4
0
 public override void RaiseCommand(CommandEventArgs e)
 {
     // base.RaiseCommand(e); // do not fire to parent containers!
     if (ButtonClick != null)
     {
         if (clickEvent == null) clickEvent = new ButtonGroupEventArgs();
         int index = int.Parse(e.Command);
         clickEvent.Index = index;
         clickEvent.Button = buttons[index];
         ButtonClick(this, clickEvent);
     }
 }