Пример #1
0
        /*
        public Hook(Form1 mainForm, Output.Gamepad game) { frmMain = mainForm; _gamepad = game; }

        private Output.Gamepad _gamepad;
        private Form1 frmMain;
        private Menu.ShowMenu formMenu;
        private Config.Configuration system;
        private Input.KeyboardInterface keyboard;
        */
        public void enableMouseHook()
        {
            MouseDownFilter mouseFilter = new MouseDownFilter(_class.Home);
            mouseFilter.LeftClick += mouseFilter_leftClick;
            mouseFilter.LeftRelease += mouseFilter_leftRelease;
            mouseFilter.mouseMoved += mouseFilter_mouseMovement;
            mouseFilter.RightClick += mouseFilter_rightClick;
            mouseFilter.RightRelease += mouseFilter_rightRelease;

            Application.AddMessageFilter(mouseFilter);
        }
Пример #2
0
        /*
         * public Hook(Form1 mainForm, Output.Gamepad game) { frmMain = mainForm; _gamepad = game; }
         *
         * private Output.Gamepad _gamepad;
         * private Form1 frmMain;
         * private Menu.ShowMenu formMenu;
         * private Config.Configuration system;
         * private Input.KeyboardInterface keyboard;
         */

        public void enableMouseHook()
        {
            MouseDownFilter mouseFilter = new MouseDownFilter(_class.Home);

            mouseFilter.LeftClick    += mouseFilter_leftClick;
            mouseFilter.LeftRelease  += mouseFilter_leftRelease;
            mouseFilter.mouseMoved   += mouseFilter_mouseMovement;
            mouseFilter.RightClick   += mouseFilter_rightClick;
            mouseFilter.RightRelease += mouseFilter_rightRelease;

            Application.AddMessageFilter(mouseFilter);
        }