コード例 #1
0
        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);
        }
コード例 #2
0
 internal static void RegisterAll(IntPtr mainFormHandle)
 {
     GlobalHotKeyManager.mainFormHandle = mainFormHandle;
     GlobalHotKeyManager.RegisterAll();
 }