示例#1
0
        private void D3DContent_MouseDown(object sender, MouseEventArgs e)
        {
            Focus();

            switch (e.Button)
            {
            case MouseButtons.Left:
                m_leftDown = true;
                if (_drawable.MouseLeftDown(e.X, e.Y))
                {
                    Invalidate();
                }
                Capture = true;
                break;

            case MouseButtons.Middle:
                m_middleDown = true;
                if (_drawable.MouseMiddleDown(e.X, e.Y))
                {
                    Invalidate();
                }
                Capture = true;
                break;

            case MouseButtons.Right:
                m_rightDown = true;
                if (_drawable.MouseRightDown(e.X, e.Y))
                {
                    Invalidate();
                }
                Capture = true;
                break;
            }
        }
示例#2
0
 public override bool MouseLeftDown(int x, int y)
 {
     if (_drawable == null)
     {
         return(false);
     }
     return(_drawable.MouseLeftDown(x, y));
 }
示例#3
0
        public bool MouseLeftDown(int x, int y)
        {
            if (!_rect.DownAny)
            {
                UpdateCaptureFocus(x, y);
            }
            _rect.MouseLeftDown(x, y);

            if (_target == null)
            {
                return(false);
            }
            else
            {
                return(_target.MouseLeftDown(x, y));
            }
        }