Beispiel #1
0
 /// <summary>
 /// <para>Raises the <see cref="Executing"/> event.</para>
 /// </summary>
 /// <param name="e">
 /// <para>The <see cref="CommandExecutingEventArgs"/> containing the event data.</para></param>
 protected virtual void OnExecuting(CommandExecutingEventArgs e)
 {
     if (events != null)
     {
         EventHandler handler = (EventHandler)events[ExecutingEvent];
         if (handler != null)
         {
             handler(this, e);
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// <para>Executes the command.</para>
        /// </summary>
        /// <param name="node">
        /// <para>The node to execute on the command on.</para>
        /// </param>
        public void Execute(ConfigurationNode node)
        {
            CommandExecutingEventArgs e = new CommandExecutingEventArgs();

            OnExecuting(e);
            if (e.Cancel)
            {
                return;
            }
            UIService.ClearErrorDisplay();
            ExecuteCore(node);
            OnExecuted(new EventArgs());
            ClearErrorsBeforeExitingCommand();
        }
 /// <summary>
 /// <para>Raises the <see cref="Executing"/> event.</para>
 /// </summary>
 /// <param name="e">
 /// <para>The <see cref="CommandExecutingEventArgs"/> containing the event data.</para></param>
 protected virtual void OnExecuting(CommandExecutingEventArgs e)
 {
     if (events != null)
     {
         EventHandler handler = (EventHandler)events[ExecutingEvent];
         if (handler != null)
         {
             handler(this, e);
         }
     }
 }
 /// <summary>
 /// <para>Executes the command.</para>
 /// </summary>
 /// <param name="node">
 /// <para>The node to execute on the command on.</para>
 /// </param>
 public void Execute(ConfigurationNode node)
 {
     CommandExecutingEventArgs e = new CommandExecutingEventArgs();
     OnExecuting(e);
     if (e.Cancel)
     {
         return;
     }
     UIService.ClearErrorDisplay();
     ExecuteCore(node);
     OnExecuted(new EventArgs());
     ClearErrorsBeforeExitingCommand();
 }