Example #1
0
 protected void OnAction(object sender, ActionCancelEventArgs e)
 {
     if (Action != null)
     {
         Action(sender, e);
     }
 }
Example #2
0
 private void Form1_Action(object sender, ActionCancelEventArgs e)
 {
     e.Cancel = !DoActions();
     if (e.Cancel)
     {
         e.Message = "Wasn't the right time.";
     }
 }
Example #3
0
 private void buttonRaise_Click(object sender, EventArgs e)
 {
     ActionCancelEventArgs cancelEvent = new ActionCancelEventArgs();
      OnAction(this, cancelEvent);
      if (cancelEvent.Cancel)
     labelInfo.Text = cancelEvent.Message;
      else
     labelInfo.Text = busEntity.TimeString;
 }
Example #4
0
        private void buttonRaise_Click(object sender, EventArgs e)
        {
            ActionCancelEventArgs cancelEvent = new ActionCancelEventArgs();

            OnAction(this, cancelEvent);
            if (cancelEvent.Cancel)
            {
                labelInfo.Text = cancelEvent.Message;
            }
            else
            {
                labelInfo.Text = busEntity.TimeString;
            }
        }
Example #5
0
 private void Form1_Action(object sender, ActionCancelEventArgs e)
 {
     e.Cancel = !DoActions();
      if (e.Cancel)
     e.Message = "Wasn't the right time.";
 }
Example #6
0
 protected void OnAction(object sender, ActionCancelEventArgs e)
 {
     if (Action != null)
     Action(sender, e);
 }