Inheritance: System.Web.UI.WebControls.CommandEventArgs
Exemplo n.º 1
0
 protected virtual void OnItemCommand(AccordionCommandEventArgs args)
 {
     if (ItemCommand != null)
     {
         ItemCommand(this, args);
     }
 }
 // Pass an AccordionCommandEventArgs whenever a CommandEvent is raised
 protected override bool OnBubbleEvent(object source, EventArgs args) {
     var commandArgs = args as CommandEventArgs;
     if(commandArgs != null) {
         var accordionArgs = new AccordionCommandEventArgs(this, commandArgs.CommandName, commandArgs.CommandArgument);
         RaiseBubbleEvent(this, accordionArgs);
         return true;
     }
     return false;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Wrap the CommandArgs of an ItemCommand event with AccordionCommandEventArgs
 /// </summary>
 /// <param name="source">Source</param>
 /// <param name="args">EventArgs</param>
 /// <returns>Whether the event was handled</returns>
 protected override bool OnBubbleEvent(object source, EventArgs args)
 {
     bool handled = false;
     AccordionCommandEventArgs accordionArgs = args as AccordionCommandEventArgs;
     if (accordionArgs != null)
     {
         OnItemCommand(accordionArgs);
         handled = true;
     }
     return handled;
 }
Exemplo n.º 4
0
        /// <summary>
        /// Pass an AccordionCommandEventArgs whenever a CommandEvent is raised
        /// </summary>
        /// <param name="source">Source</param>
        /// <param name="args">EventArgs</param>
        /// <returns>If the event was handled</returns>
        protected override bool OnBubbleEvent(object source, EventArgs args)
        {
            CommandEventArgs commandArgs = args as CommandEventArgs;

            if (commandArgs != null)
            {
                AccordionCommandEventArgs accordionArgs = new AccordionCommandEventArgs(this, commandArgs.CommandName, commandArgs.CommandArgument);
                RaiseBubbleEvent(this, accordionArgs);
                return(true);
            }
            return(false);
        }
Exemplo n.º 5
0
 protected virtual void OnItemCommand(AccordionCommandEventArgs args)
 {
     if (ItemCommand != null)
         ItemCommand(this, args);
 }