예제 #1
0
 private void GenerateStatusEvent(StatusEventArgs args)
 {
     if (StatusEventHandler != null && StatusEventHandler.GetInvocationList().Length > 0)
     {
         StatusEventHandler(this, args);
     }
 }
예제 #2
0
 public void RemoveStatusEventHandler(EventHandler <StatusEventArgs> statusEventHandler)
 {
     if (StatusEventHandler != null)
     {
         if (Array.IndexOf(StatusEventHandler.GetInvocationList(), statusEventHandler) != -1)
         {
             StatusEventHandler -= statusEventHandler;
         }
     }
 }
예제 #3
0
 public void AddStatusEventHandler(EventHandler <StatusEventArgs> statusEventHandler)
 {
     if (StatusEventHandler == null)
     {
         StatusEventHandler += statusEventHandler;
     }
     else
     {
         if (Array.IndexOf(StatusEventHandler.GetInvocationList(), statusEventHandler) == -1)
         {
             StatusEventHandler += statusEventHandler;
         }
     }
 }