public void AddHotKey(Keys KeyCode, EModiferKey Modifiers, string HotKeyID) { if (mHotKeyIDList.ContainsKey(HotKeyID) == true) { return; } short ID = Native.GlobalAddAtom(HotKeyID); mHotKeyIDList.Add(HotKeyID, ID); mHotKeyList.Add(ID, new GlobalHotKeyObject(KeyCode, Modifiers, HotKeyID)); Native.RegisterHotKey(mForm.Handle, (int)ID, (int)mHotKeyList[ID].Modifier, (int)mHotKeyList[ID].HotKey); }
public GlobalHotKeyObject(Keys NewHotKey, EModiferKey NewModifier, string NewHotKeyID) { mHotKey = NewHotKey; mModifier = NewModifier; mHotKeyID = NewHotKeyID; }