Exemplo n.º 1
0
 private void CommItemSaveEvent_Fired(CodeBase.ODEventArgs e)
 {
     if (e.Name != "CommItemSave")
     {
         return;
     }
     //save comm item
     SaveCommItem(false);
 }
Exemplo n.º 2
0
 public void Fire(ODEventArgs e)
 {
     if (e.Tag is ProgressBarHelper)
     {
         ProgressBarHelper progBarHelper = (ProgressBarHelper)e.Tag;
         if (progBarHelper.ProgressStyle == ProgBarStyle.NoneSpecified)
         {
             progBarHelper.ProgressStyle = _progBarStyle;
         }
     }
     _event.FireEvent(e);
 }
Exemplo n.º 3
0
 private void CommItemSaveEvent_Fired(CodeBase.ODEventArgs e)
 {
     if (e.EventType != ODEventType.CommItemSave)
     {
         return;
     }
     if (e.Tag != null && e.Tag is string && e.Tag.ToString() == "ShutdownAllWorkstations")
     {
         _isUserClosing = false;
     }
     //save comm item
     SaveCommItem(false);
 }
Exemplo n.º 4
0
 public void ODEvent_Fired(ODEventArgs e)
 {
     try {
         //We don't know what thread will cause a progress status change, so invoke this method as a delegate if necessary.
         if (this.InvokeRequired)
         {
             this.Invoke((Action) delegate() { ODEvent_Fired(e); });
             return;
         }
         //If Tag on the ODEvent is null then there is nothing to for this event handler to do.
         if (e.Tag == null)
         {
             return;
         }
         //Check to see if an ODEventType was set otherwise check the ODEventName to make sure this is an event that this instance cares to process.
         if (_odEventType != ODEventType.Undefined)
         {
             //Always use ODEventType if one was explicitly set regardless of what _odEventName is set to.
             if (_odEventType != e.EventType)
             {
                 return;
             }
         }
         ProgressBarHelper progHelper = new ProgressBarHelper("");
         bool   hasProgHelper         = false;
         string status = "";
         if (e.Tag.GetType() == typeof(string))
         {
             status = ((string)e.Tag);
         }
         else if (e.Tag.GetType() == typeof(ProgressBarHelper))
         {
             progHelper    = (ProgressBarHelper)e.Tag;
             status        = progHelper.LabelValue;
             hasProgHelper = true;
         }
         else                  //Unsupported type passed in.
         {
             return;
         }
         UpdateProgress(status, progHelper, hasProgHelper);
     }
     catch (Exception ex) {
         ex.DoNothing();                //It's just progress...
     }
 }
Exemplo n.º 5
0
 ///<summary>Triggers the global Fired event to get called with the passed in ODEventArgs.</summary>
 public static void Fire(ODEventArgs e)
 {
     Fired?.Invoke(e);
 }
Exemplo n.º 6
0
 ///<summary></summary>
 public void Fire(ODEventArgs e)
 {
 }