Beispiel #1
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// OnButtonClick runs when the underlying CommandButton is clicked
 /// </summary>
 /// -----------------------------------------------------------------------------
 protected override void OnButtonClick(EventArgs e)
 {
     base.OnButtonClick(e);
     if (!ActionManager.ProcessAction(ModuleAction))
     {
         OnAction(new ActionEventArgs(ModuleAction, ModuleControl.ModuleContext.Configuration));
     }
 }
Beispiel #2
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// MenuItem_Click handles the Menu Click event
 /// </summary>
 /// -----------------------------------------------------------------------------
 private void MenuItem_Click(NavigationEventArgs args)
 {
     if (Globals.NumberMatchRegex.IsMatch(args.ID))
     {
         ModuleAction action = ModuleControl.ModuleContext.Actions.GetActionByID(Convert.ToInt32(args.ID));
         if (!ActionManager.ProcessAction(action))
         {
             OnAction(new ActionEventArgs(action, ModuleControl.ModuleContext.Configuration));
         }
     }
 }
Beispiel #3
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// ProcessAction processes the action event
        /// </summary>
        protected void ProcessAction(string ActionID)
        {
            int output;

            if (Int32.TryParse(ActionID, out output))
            {
                ModuleAction action = Actions.GetActionByID(output);
                if (action != null)
                {
                    if (!ActionManager.ProcessAction(action))
                    {
                        OnAction(new ActionEventArgs(action, ModuleContext.Configuration));
                    }
                }
            }
        }