示例#1
0
        public static void Terminate()
        {
            lock (_instanceLock)
            {
                if (_instance == null)
                {
                    return;
                }

                _instance.TerminateInternal();
                _instance = null;
            }
        }
示例#2
0
        public static VbeEvents Initialize(IVBE vbe)
        {
            lock (_instanceLock)
            {
                if (_instance == null)
                {
                    _instance = new VbeEvents(vbe);
                    Interlocked.Exchange(ref _terminated, _false);
                }
            }

            return(_instance);
        }
 public static void UnhookEvents()
 {
     lock (ThreadLock)
     {
         SelectionChanged    = delegate { };
         IntelliSenseChanged = delegate { };
         KeyDown             = delegate { };
         WindowFocusChange   = delegate { };
         User32.UnhookWinEvent(_eventHandle);
         Subclasses.Dispose();
         VbeEvents.Terminate();
         _vbe = null;
     }
 }