/// <summary> /// Unregisters all the registered Hotkeys. /// </summary> private void Unregister() { foreach (KeyValuePair <int, string> hotKey in Hotkeys) { HotkeyCore.UnregisterKey(this, hotKey.Key); HotkeyCore.GlobalDeleteAtom(hotKey.Key); } Hotkeys.Clear(); }
/// <summary> /// Unregisters any registered Hotkeys. /// </summary> /// <param name="hotkey">The registered Hotkey.</param> private void Unregister(string hotkey) { int intKey = 0; foreach (KeyValuePair <int, string> hotKey in Hotkeys) { if (hotKey.Value == hotkey) { intKey = hotKey.Key; HotkeyCore.UnregisterKey(this, hotKey.Key); HotkeyCore.GlobalDeleteAtom(hotKey.Key); break; } } if (intKey > 0) { Hotkeys.Remove(intKey); } }