public void UnregisterHotkey(MonitorSwitcherGUI parent) { hotkeyCtrl.Pressed -= parent.KeyHook_KeyUp; if (hotkeyCtrl.Registered) { hotkeyCtrl.Unregister(); } }
public void RegisterHotkey(MonitorSwitcherGUI parent) { hotkeyCtrl.Pressed += parent.KeyHook_KeyUp; hotkeyCtrl.Register(parent, this); }