コード例 #1
0
ファイル: MainForm.cs プロジェクト: tonyfcw/Daigassou
 private Task NewCancellableTask(CancellationToken token)
 {
     return(Task.Run(() =>
     {
         var keyPlayLists = mtk.ArrangeKeyPlays(mtk.Index);
         KeyController.KeyPlayBack(keyPlayLists, 1, cts.Token);
         _runningFlag = false;
     }, token));
 }
コード例 #2
0
ファイル: ConfigForm.cs プロジェクト: TundraWork/Daigassou
 public ConfigForm(ArrayList _keyList, KeyController _kc, HotKeyManager _hkm)
 {
     keyList = _keyList;
     InitializeComponent();
     keyBindings = new[] { hotKeyControl1, hotKeyControl2, hotKeyControl3, hotKeyControl4, hotKeyControl5 };
     kc          = _kc;
     hkm         = _hkm;
     InitValue();
 }
コード例 #3
0
        public void KeyboardPress(Keys ctrKeys, Keys viKeys)
        {
            if (_lastCtrlKey != ctrKeys)
            {
                KeyController.keybd_event(this._lastCtrlKey, (byte)KeyController.MapVirtualKey((uint)this._lastCtrlKey, 0U), 2, 0);
                Thread.Sleep(8);
                if ((uint)ctrKeys > 0U)
                {
                    KeyController.keybd_event(ctrKeys, (byte)KeyController.MapVirtualKey((uint)ctrKeys, 0U), 0, 0);
                    Thread.Sleep(8);
                }
            }

            KeyController.keybd_event(viKeys, (byte)KeyController.MapVirtualKey((uint)viKeys, 0U), 0, 0);
            this._lastCtrlKey = ctrKeys;
        }
コード例 #4
0
ファイル: AboutForm.cs プロジェクト: TundraWork/Daigassou
 public AboutForm(KeyController _kc)
 {
     kc = _kc;
     InitializeComponent();
 }
コード例 #5
0
 private void KeyboardPress(Keys viKeys)
 {
     lock (this.keyLock)
         KeyController.keybd_event(viKeys, (byte)KeyController.MapVirtualKey((uint)viKeys, 0U), 0, 0);
 }
コード例 #6
0
 public void KeyboardRelease(Keys viKeys)
 {
     KeyController.keybd_event(viKeys, (byte)KeyController.MapVirtualKey((uint)viKeys, 0U), 2, 0);
 }