Beispiel #1
0
 public void attachCommandEvents(CEBeforeEventHandler before, CEAfterEventHandler after)
 {
     cmdEvents = Env.Events.CommandEvents;
     lock (_lock) {
         cmdEvents.BeforeExecute -= before;
         cmdEvents.BeforeExecute += before;
         cmdEvents.AfterExecute  -= after;
         cmdEvents.AfterExecute  += after;
     }
 }
Beispiel #2
0
 public void detachCommandEvents(CEBeforeEventHandler before, CEAfterEventHandler after)
 {
     if (cmdEvents == null)
     {
         return;
     }
     lock (_lock) {
         cmdEvents.BeforeExecute -= before;
         cmdEvents.AfterExecute  -= after;
     }
 }