예제 #1
0
파일: Form1.cs 프로젝트: dyq94310/HotKey
        private void updateHotKey(HotKey hk)
        {
            if (!list.Contains(hk))
            {
                MessageBox.Show("选择出错,请重启应用");
                return;
            }
            IHotKey aucInputKey = new FrmInputKey();

            aucInputKey.getHotKey(hk);
        }
예제 #2
0
파일: Form1.cs 프로젝트: dyq94310/HotKey
        private void InsertHotKey()
        {
            this.dgv.DataSource = null;

            IHotKey aucInputKey = new FrmInputKey();
            HotKey  cmd         = new HotKey();

            cmd.HotKeyId = new Random().Next();
            HotKey hotKey = aucInputKey.getHotKey(cmd);

            if (hotKey.RegKeys == null)
            {
                return;
            }

            list.Add(hotKey);
            this.dgv.DataSource = list;
        }