Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo n.º 3
0
 public static extern bool RegisterHotKey(IntPtr wnd, int id, MODKEY mode, Keys vk);
Ejemplo n.º 4
0
 public static extern bool RegisterHotKey(IntPtr wnd, int id, MODKEY mode, Keys vk);
Ejemplo n.º 5
0
 public HotKeyObject(Keys NewHotKey, MODKEY NewModifier, string NewHotKeyID)
 {
     mHotKey = NewHotKey;
     mModifier = NewModifier;
     mHotKeyID = NewHotKeyID;
 }
Ejemplo n.º 6
0
 public HotKeyObject(Keys NewHotKey, MODKEY NewModifier, string NewHotKeyID)
 {
     mHotKey   = NewHotKey;
     mModifier = NewModifier;
     mHotKeyID = NewHotKeyID;
 }
Ejemplo n.º 7
0
 public static extern bool RegisterHotKey(IntPtr wnd, int id, MODKEY mode, System.Windows.Forms.Keys vk);