public bool UnregisterHotkey(HotkeyInfo hotkeyInfo) { if (hotkeyInfo != null) { if (hotkeyInfo.ID > 0) { bool result = NativeMethods.UnregisterHotKey(Handle, hotkeyInfo.ID); if (result) { NativeMethods.GlobalDeleteAtom(hotkeyInfo.ID); hotkeyInfo.ID = 0; hotkeyInfo.Status = HotkeyStatus.NotConfigured; return(true); } } hotkeyInfo.Status = HotkeyStatus.Failed; } return(false); }
public void Reset() { EditingHotkey = false; HotkeyInfo = new HotkeyInfo(); SetDefaultButtonText(); }
public void UpdateHotkey(HotkeyInfo hotkeyInfo) { HotkeyInfo = hotkeyInfo; UpdateHotkeyText(); }
private void UpdateHotkeyText() { Text = HotkeyInfo.ToString(); Invalidate(); }