コード例 #1
0
        public void Register(string name, Keys key, ModifierKeys modifiers, Func <Task> task)
        {
            int id     = HotKeyManager.RegisterHotKey(key, modifiers);
            var action = new HotkeyAction(name, id, task, key, modifiers);

            Actions.Add(action);
        }
コード例 #2
0
        public void UnRegister(string name)
        {
            HotkeyAction action = Actions.First(o => o.Name == name);

            HotKeyManager.UnregisterHotKey(action.Id);
        }