Esempio n. 1
0
        /// <summary>
        /// Diese Funktion fügt einen Hotkey hinzu und registriert ihn auch sofort
        /// </summary>
        /// <param name="KeyCode">Den KeyCode für die Taste</param>
        /// <param name="Modifiers">Die Zusatztasten wie z.B. Strg oder Alt, diese können auch mit OR kombiniert werden</param>
        /// <param name="HotKeyID">Die ID die der Hotkey bekommen soll um diesen zu identifizieren</param>
        public void AddHotKey(Keys KeyCode, MODKEY Modifiers, string HotKeyID)
        {
            if (mHotKeyIDList.ContainsKey(HotKeyID) == true) return; // TODO: might not be correct. Was : Exit Sub

            short ID = GlobalAddAtom(HotKeyID);
            mHotKeyIDList.Add(HotKeyID, ID);
            mHotKeyList.Add(ID, new HotKeyObject(KeyCode, Modifiers, HotKeyID));
            RegisterHotKey(mForm.Handle, (int)ID, (int)mHotKeyList[ID].Modifier, (int)mHotKeyList[ID].HotKey);
        }
Esempio n. 2
0
        /// <summary>
        /// Diese Funktion fügt einen Hotkey hinzu und registriert ihn auch sofort
        /// </summary>
        /// <param name="KeyCode">Den KeyCode für die Taste</param>
        /// <param name="Modifiers">Die Zusatztasten wie z.B. Strg oder Alt, diese können auch mit OR kombiniert werden</param>
        /// <param name="HotKeyID">Die ID die der Hotkey bekommen soll um diesen zu identifizieren</param>
        public void AddHotKey(Keys KeyCode, MODKEY Modifiers, string HotKeyID)
        {
            if (mHotKeyIDList.ContainsKey(HotKeyID) == true)
            {
                return;                                              // TODO: might not be correct. Was : Exit Sub
            }
            short ID = GlobalAddAtom(HotKeyID);

            mHotKeyIDList.Add(HotKeyID, ID);
            mHotKeyList.Add(ID, new HotKeyObject(KeyCode, Modifiers, HotKeyID));
            RegisterHotKey(mForm.Handle, (int)ID, (int)mHotKeyList[ID].Modifier, (int)mHotKeyList[ID].HotKey);
        }
Esempio n. 3
0
 public static extern bool RegisterHotKey(IntPtr wnd, int id, MODKEY mode, Keys vk);
Esempio n. 4
0
 public static extern bool RegisterHotKey(IntPtr wnd, int id, MODKEY mode, Keys vk);
Esempio n. 5
0
 public HotKeyObject(Keys NewHotKey, MODKEY NewModifier, string NewHotKeyID)
 {
     mHotKey = NewHotKey;
     mModifier = NewModifier;
     mHotKeyID = NewHotKeyID;
 }
Esempio n. 6
0
 public HotKeyObject(Keys NewHotKey, MODKEY NewModifier, string NewHotKeyID)
 {
     mHotKey   = NewHotKey;
     mModifier = NewModifier;
     mHotKeyID = NewHotKeyID;
 }
Esempio n. 7
0
 public static extern bool RegisterHotKey(IntPtr wnd, int id, MODKEY mode, System.Windows.Forms.Keys vk);