Пример #1
0
 public ClipboardTask(Hotkey hotkey) : this(hotkey.Number, hotkey.Action)
 {
 }
Пример #2
0
        public static bool RegisterSystemHotKey(IntPtr handle, Hotkey hotkey)
        {
            var registrationResult = RegisterHotKey(handle, hotkey.Id, hotkey.Modifier, (int)hotkey.Number);

            return(registrationResult);
        }
Пример #3
0
        public static bool UnregisterSystemHotKey(IntPtr handle, Hotkey hotkey)
        {
            var unregistrationResult = UnregisterHotKey(handle, hotkey.Id);

            return(unregistrationResult);
        }
Пример #4
0
 public bool UnregisterAllHotkeys(IntPtr handle)
 {
     Hotkey[] hotkeys = new Hotkey[registry.Values.Count];
     registry.Values.CopyTo(hotkeys, 0);
     return(hotkeys.Aggregate(true, (current, hotkey) => current & UnregisterHotkey(handle, hotkey)));
 }