Esempio n. 1
0
        //public void StartOff()
        //{
        //    if(Tr.Enabled == false)
        //    {
        //        Tr.Start();
        //    }
        //    else
        //    {
        //        Tr.Stop();
        //    }
        //}

        //private void hotkeyhander(object sender, System.Timers.ElapsedEventArgs e)
        //{
        //    //keybd_event(0x61, 0, 0, 0);
        //    //keybd_event(0x61, 0, 2, 0);
        //    //Thread.Sleep(100);
        //    //keybd_event(0x62, 0, 0, 0);
        //    //keybd_event(0x62, 0, 2, 0);
        //    //Thread.Sleep(100);
        //    //keybd_event(0x63, 0, 0, 0);
        //    //keybd_event(0x63, 0, 2, 0);
        //    Thread.Sleep(1000);
        //    keybd_event(0x64, 0, 0, 0);
        //    keybd_event(0x64, 0, 2, 0);
        //}

        //添加按钮
        private void button1_Click(object sender, EventArgs e)
        {
            frmSetKey fs = new frmSetKey();

            fs.SetKeyEventHandle += Fs_SetKeyEventHandle;
            fs.ShowDialog();
        }
Esempio n. 2
0
        private void AddKeyHandleClick(object sender, EventArgs e)
        {
            this.nowHotKeyCode = (sender as Button).Name;
            frmSetKey fs = new frmSetKey();

            fs.SetKeyEventHandle += b2_SetKeyEventHandle;
            fs.ShowDialog();
        }