private static void WindowActivatedEvent(ShellHook ShellObject, IntPtr hWnd) { if (WindowActivated != null) { WindowActivated(ShellObject, hWnd); } }
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; } }
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); }