示例#1
0
        private void InitializeHotkeysManager()
        {
            var hotkeyManager = new HotkeyManager(this.Hwnd);

            this.HotkeyMessageHandler = hotkeyManager.GetMessageHandler();
            HotkeysControl.SetHotkeyManager(hotkeyManager);
        }
示例#2
0
        private void SetupHotkeyManager()
        {
            var hotkeyManager = new HotkeyManager(this.windowHandle);

            this.HotkeyManagerMessageHandler = hotkeyManager.GetMessageHandler();
            HotkeysControl.SetHotkeyManager(hotkeyManager);

            // IHotkeyManager hm = null;
            // if(blockHotkeysInSystem)
            // {
            //     //Prevent creating manager right now since it's dependent on the window handle, which was not passed yet by window.
            //     if(this.windowHandle == IntPtr.Zero)
            //         return;
            //     var hotkeyManager = new HotkeyManager(this.windowHandle);
            //     this.HotkeyManagerMessageHandler = hotkeyManager.GetMessageHandler();
            //     hm = hotkeyManager;
            // }
            // else
            // {
            //     this.HotkeyManagerMessageHandler = null;
            //     hm = new HotkeyHookManager();
            // }
            // HotkeysControl.SetHotkeyManager(hm);
        }