Example #1
0
        public HotkeyManager(HotkeyForm form, List <HotkeySettings> hotkeys)
        {
            hotkeyForm              = form;
            hotkeyForm.HotkeyPress += hotkeyForm_HotkeyPress;
            hotkeyForm.FormClosed  += (sender, e) => hotkeyForm.InvokeSafe(() => UnregisterAllHotkeys(false));

            Hotkeys = hotkeys;

            RegisterAllHotkeys();
            ShowFailedHotkeys();
        }
Example #2
0
        public HotkeyManager(HotkeyForm form, List<HotkeySettings> hotkeys)
        {
            hotkeyForm = form;
            hotkeyForm.HotkeyPress += hotkeyForm_HotkeyPress;
            hotkeyForm.FormClosed += (sender, e) => hotkeyForm.InvokeSafe(() => UnregisterAllHotkeys(false));

            Hotkeys = hotkeys;

            RegisterAllHotkeys();
            ShowFailedHotkeys();
        }