Beispiel #1
0
        // wow> if you want to eat the mouse event,
        // then must process the MouseDown event, as the wow does.
        public int MouseDown(object sender, MouseEventArgs e)
        {
            if (MouseHelper.misbusy)
            {
                return(0);
            }
            //misbusy = true;
            //WinMon.gtWinMouse();
            //mgesture.ts_dis(e);

            //Point point1 = new Point();
            //point1.X = 0; point1.Y = 0;
            //WinApis.GetCursorPos(ref point1);

            DbMsg.Msg("mouse down," + e.X.ToString() + "," + e.Y.ToString());

            //return 0;
            MouseArgsR er = new MouseArgsR(e.X, e.Y);


            misrdouble = false;
            //Console.WriteLine(e.Button.ToString());
            switch (e.Button)
            {
            case MouseButtons.Left:
                this.onLmouseDown(sender, er);

                //if (mwowman.onLmouseDown(e.X, e.Y))
                //    ishandled = true;

                //mMouseEHandler.OnLDown(ref misrdouble);
                //if (misrdouble)
                //{
                //    mwowman.onLDouble();
                //}

                break;

            case MouseButtons.Right:
                this.onRmouseDown(sender, er);
                //if (mwowman.onRmouseDown(e.X, e.Y))
                //    ishandled = false;

                break;

            case MouseButtons.Middle:
                mMouseEHandler.OnMDown();
                break;
            }

            //mform.onMouseEvent("MouseDown", e.Button.ToString(),
            //    e.X.ToString(), e.Y.ToString(), "");
            bool ishandled = er.ishandled;
            int  ret       = ((ishandled) && !miskeydown) ? 1 : 0;

            DbMsg.Msg("ret=" + ret.ToString() + "," + miskeydown.ToString());
            return(ret);
        }
Beispiel #2
0
        public void onRmouseDown(Object sender, EventArgs e)
        {
            MouseArgsR er = (MouseArgsR)e;
            bool       b  = this.onRmouseDown(er.X, er.Y);

            if (b)
            {
                er.ishandled = true;
            }
        }
Beispiel #3
0
        public int MouseUp(object sender, MouseEventArgs e)
        {
            if (MouseHelper.misbusy)
            {
                return(0);
            }
            DbMsg.Msg("mouse up," + e.X.ToString() + "," + e.Y.ToString());
            //return 0;
            //mform.onMouseEvent("MouseUp", e.Button.ToString(),
            //    e.X.ToString(), e.Y.ToString(), "");

            //Point point = new Point();
            //point.X = 0; point.Y = 0;
            //WinApis.GetCursorPos(ref point);
            //Console.WriteLine("mouse up," + point.X.ToString() + "," + point.Y.ToString());

            MouseArgsR er = new MouseArgsR(e.X, e.Y);

            switch (e.Button)
            {
            case MouseButtons.Left:
                mMouseEHandler.OnLUp();
                break;

            case MouseButtons.Right:
                mMouseEHandler.OnRUp();


                mMouseEHandler.OnRDown(ref misrdouble);
                if (misrdouble)
                {
                    //mwowman.onRDouble();
                    this.onRmouseDouble(sender, er);
                }

                break;

            case MouseButtons.Middle:
                mMouseEHandler.OnMDown();
                break;
            }
            return(0);
        }
Beispiel #4
0
        public void onRmouseDouble(Object sender, EventArgs e)
        {
            MouseArgsR er = (MouseArgsR)e;

            this.onRDouble();
        }