示例#1
0
        private void b2_SetKeyEventHandle(object arg1, SetKeyEventArgs arg2)
        {
            var hotkey = sysParam.hotKeyDatas[nowHotKeyCode];

            if (hotkey.keyHandles.ContainsKey(arg2.keycode))
            {
                MessageBox.Show("Sorry不能重复添加");
                return;
            }
            hotkey.keyHandles.Add(arg2.keycode, new KeyHandle()
            {
                hitKeyCode = arg2.keycode, hitKeyName = arg2.keyname
            });
            AddHandleKey(nowHotKeyCode, arg2.keycode, arg2.keyname, "0", "100", "1000");
        }
示例#2
0
        //添加完成事件
        private void Fs_SetKeyEventHandle(object arg1, SetKeyEventArgs arg2)
        {
            if (sysParam.hotKeyDatas.Keys.Contains(arg2.keycode))
            {
                MessageBox.Show("按键重复");
                return;
            }

            sysParam.hotKeyDatas.Add(arg2.keycode, new HotkeyData()
            {
                hotKeyCode = arg2.keycode, hotKeyName = arg2.keyname, keyHandles = new Dictionary <string, KeyHandle>()
            });

            AddHotKey(arg2.keycode, arg2.keyname);

            //Console.WriteLine(sysParam.hotkeyDatas);
        }