Example #1
0
 public void Add(NativeKey key, Action value)
 {
     if (_isRunning)
     {
         throw new InvalidOperationException($"Hotkey running now. Please Stop it");
     }
     _hotkeys.Add(key, value);
 }
Example #2
0
 public void Remove(NativeKey key)
 {
     if (_isRunning)
     {
         throw new InvalidOperationException($"Hotkey running now. Please Stop it");
     }
     _hotkeys.Remove(key);
 }
Example #3
0
 public Action this[NativeKey key]
 {
     get { return(_hotkeys[key]); }
     set
     {
         if (_isRunning)
         {
             throw new InvalidOperationException($"Hotkey running now. Please Stop it");
         }
         _hotkeys[key] = value;
     }
 }
Example #4
0
 public bool Contains(NativeKey key)
 {
     return(_hotkeys.ContainsKey(key));
 }