Пример #1
0
 public static void EnableEvents(RedrawingDisablerSession session)
 {
     lock (_lock)
     {
         _activeSessions.RemoveAll(s => s._sessionId.CompareTo(session._sessionId) == 0);
         if (!_activeSessions.Exists(s => s._control == session._control))
         {                //no more sessions for this control -we are at top-level block so perform
             Misc.ResumeDrawing(session._control, session._performRefreshOnBlockExit);
         }
     }
 }
Пример #2
0
 public static void DisableEvents(RedrawingDisablerSession session)
 {
     lock (_lock)
     {
         if (!_activeSessions.Exists(s => s._control == session._control))
         {                //no other sessions for this control -we are at top-level block so perform
             Misc.SuspendDrawing(session._control);
         }
         _activeSessions.Add(session);
     }
 }