private static void WindowActivatedEvent(ShellHook ShellObject, IntPtr hWnd)
 {
     if (WindowActivated != null)
     {
         WindowActivated(ShellObject, hWnd);
     }
 }
예제 #2
0
        static WindowHook()
        {
            if (sh == null)
            {
                sh = new ShellHook(SharedMessagePump.GetHandle());

                sh.WindowCreated   += new GeneralShellHookEventHandler(WindowCreatedEvent);
                sh.WindowDestroyed += new GeneralShellHookEventHandler(WindowDestroyedEvent);
                sh.WindowActivated += new GeneralShellHookEventHandler(WindowActivatedEvent);
            }
        }
        internal WindowHook(SyncFactory factory)
        {
            if (sh == null)
            {
                sh = new ShellHook(factory.GetHandle());

                sh.WindowCreated   += WindowCreatedEvent;
                sh.WindowDestroyed += WindowDestroyedEvent;
                sh.WindowActivated += WindowActivatedEvent;
            }
        }
예제 #4
0
 private static void WindowActivatedEvent(ShellHook ShellObject, IntPtr hWnd)
 {
     WindowActivated?.Invoke(ShellObject, hWnd);
 }
 internal void Destroy()
 {
     sh = null;
 }
 private void WindowDestroyedEvent(ShellHook ShellObject, IntPtr hWnd)
 {
     WindowDestroyed?.Invoke(ShellObject, hWnd);
 }