예제 #1
0
파일: Form1.cs 프로젝트: alastorid/gcaf
        private void Form1_Load(object sender, EventArgs e)
        {
            Form1.mInt32Delay2 = Convert.ToInt32(this.textBox3.Text);
            Form1.mInt32Delay1 = Convert.ToInt32(this.textBox2.Text);

            isPrecise = this.radioButton2.Checked;
            mIsDio = this.radioButton10.Checked;
            macroEnabled = false;

            mDxDeviceCtrl = new DxDeviceCtrl();
            mJoyControl=new JoyControl();

            HookManager.KeyDown += new KeyEventHandler(this.OnKeyDownListener);
            HookManager.KeyUp += new KeyEventHandler(this.OnKeyUpListener);

            this.mThread = new Thread(new ThreadStart(this.Service));
            this.mThread.IsBackground = true;
            this.mThread.Priority = ThreadPriority.Highest;
            this.mThread.Start();
        }
예제 #2
0
파일: GameCtrl.cs 프로젝트: alastorid/gcac
        //TODO:Add Resolution  arguement
        public GameCtrl()
        {
            mMouseCtrl = new MouseCtrl();
            //mJoyControl = new JoyControl();
            mDxDeviceCtrl = new DxDeviceCtrl();

            mDictDescribes = new Dictionary<act, funcDescribe>
            {
                {act.NxtPage, new funcDescribe()
                {
                    type=Type.mouseClick,
                    delay = 300,
                    point = new Point(886,166)
                } },
                {act.PrePage, new funcDescribe()
                {
                    type=Type.mouseClick,
                    delay = 300,
                    point = new Point(808,166)
                } },
                {act.SlaveEnterPass, new funcDescribe()
                {
                    type=Type.mouseClick,
                    delay = 33 ,
                    point = new Point(646, 406)
                } },
                {act.ReadyToGo, new funcDescribe()
                {
                    type=Type.keyboard,
                    KeybdInput = DxDeviceCtrl.DirectInputKbdKey.DIK_F9,
                    VirtualKeyInput = VirtualKeys.F9,
                    delay = 33 ,
                    //point = new Point(1185, 858)
                } },
                {act.Exit, new funcDescribe()
                {
                    type=Type.keyboard,
                    KeybdInput =  DxDeviceCtrl.DirectInputKbdKey.DIK_ESCAPE,
                    VirtualKeyInput = VirtualKeys.Escape,
                    delay = 33 ,
                    //point = new Point(646, 406)
                } },
                {act.Enter, new funcDescribe()
                {
                    type=Type.keyboard,
                    KeybdInput = DxDeviceCtrl.DirectInputKbdKey.DIK_RETURN,
                    VirtualKeyInput = VirtualKeys.Return,
                    delay = 33 ,
                    //point = new Point(634, 464)
                } },
                {act.MouseGoAway, new funcDescribe()
                {
                    type=Type.mouseMove,
                    //KeybdInput = JoyControl.KEY_ENTER,
                    point = new Point(688, 300),
                    delay = 33
                } },
                {act.ChangeCompeteType,new funcDescribe()
                {
                    type=Type.mouseClick,
                    delay = 33,
                    point = new Point(1000, 256)
                } },
                {act.CreateRoom,new funcDescribe()
                {
                    type=Type.mouseClick,
                    delay = 33,
                    point = new Point(900, 566)
                } },
                {act.LeaveRoom,new funcDescribe()
                {
                    type=Type.mouseClick,
                    point = new Point(1310, 64),
                    delay = 33
                } },
                {act.GoCompete,new funcDescribe()
                {
                    type=Type.mouseClick,
                    point = new Point(213, 58),
                    delay = 33
                } },
                {act.ConfigRoom,new funcDescribe()
                {
                    type=Type.mouseClick,
                    point = new Point(716, 65),
                    delay = 33
                } },
                {act.PromptYes, new funcDescribe()
                {
                    type=Type.keyboard,
                    KeybdInput = DxDeviceCtrl.DirectInputKbdKey.DIK_Y,
                    VirtualKeyInput = VirtualKeys.Y,
                    delay = 33 ,
                    //point = new Point(1185, 858)
                } }

            };
        }