private void InitializeFormHandlers() { if (this.FormState == FormInitState.Initialized) { return; } this.FormState = FormInitState.Initializing; GlobalHotKeyManager.RegisterAll(this.Handle); this.FormClosing += this.Form1_FormClosing; this.hiddenWindows.SelectedIndexChanged += (s, e) => this.Invoke(() => this.show.Enabled = this.hiddenWindows.SelectedItems.Count != 0); this.HiddenWindowsChanged += this.OnHiddenWindowsChanged; this.VisibleChanged += (s, e) => this.Invoke(() => this.notifyIcon.Visible = !this.Visible); }
internal static void RegisterAll(IntPtr mainFormHandle) { GlobalHotKeyManager.mainFormHandle = mainFormHandle; GlobalHotKeyManager.RegisterAll(); }