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); }
public void UnRegister(string name) { HotkeyAction action = Actions.First(o => o.Name == name); HotKeyManager.UnregisterHotKey(action.Id); }