Esempio n. 1
0
 public void Clear()
 {
     foreach (ushort id in this.HotKeyTable.Keys)
     {
         HotKeyManager.UnregisterHotKey(this.Owner.Handle, id);
         GlobalAtom.Delete(id);
     }
     this.HotKeyTable.Clear();
 }
Esempio n. 2
0
        public bool Unregister(ModifierKeys modifierKey, Keys key)
        {
            ushort id = GlobalAtom.Find(this.GetHotKeyName(modifierKey, key));

            if (this.HotKeyTable.ContainsKey(id))
            {
                if (HotKeyManager.UnregisterHotKey(this.Owner.Handle, id))
                {
                    this.HotKeyTable.Remove(id);
                    GlobalAtom.Delete(id);
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }