public HotkeySettings(HotkeyType job, Keys hotkey = Keys.None) : this() { TaskSettings = TaskSettings.GetDefaultTaskSettings(); TaskSettings.Job = job; HotkeyInfo = new HotkeyInfo(hotkey); }
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 HotkeySettings() { HotkeyInfo = new HotkeyInfo(); }