Esempio n. 1
0
 public HotkeySettings(HotkeyType job, Keys hotkey = Keys.None)
     : this()
 {
     TaskSettings = TaskSettings.GetDefaultTaskSettings();
     TaskSettings.Job = job;
     HotkeyInfo = new HotkeyInfo(hotkey);
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public HotkeySettings()
 {
     HotkeyInfo = new HotkeyInfo();
 }
Esempio n. 4
0
 public HotkeySettings()
 {
     HotkeyInfo = new HotkeyInfo();
 }
Esempio n. 5
0
 public HotkeySettings(HotkeyType job, Keys hotkey = Keys.None) : this()
 {
     TaskSettings     = TaskSettings.GetDefaultTaskSettings();
     TaskSettings.Job = job;
     HotkeyInfo       = new HotkeyInfo(hotkey);
 }