Example #1
0
        /// <summary>
        /// 处理鼠标事件。该方法会触发一些click事件,重刷一些按钮等
        /// </summary>
        /// <param name="location"></param>
        /// <param name="type"></param>
        public void MouseOperation(Point location, MouseOperationType type)
        {
            //if (type == MouseOperationType.Up)
            _lastMouseUpLocation = location;
            //else
            //    _lastMouseUpLocation = Point.Empty;

            if (ShowNewTabBtn)
            {
                _newTabBtn.MouseOperation(location, type);
            }
            if (_hiddenTabsCount > 0 || AlwaysShowListAllBtn)
            {
                _listAllBtn.MouseOperation(location, type);
            }
            foreach (MdiGMTabItem tab in _listTabItems)
            {
                if (!tab.IsHidden)
                {
                    tab.CloseBtn.MouseOperation(location, type);
                }
            }

            switch (type)
            {
            case MouseOperationType.Down:
                MouseOperationDown(location);
                break;

            case MouseOperationType.Up:
                MouseOperationUp(location);
                break;
            }
        }
        public void MouseOperation(Point location, MouseOperationType type)
        {
            if (!Visible)
            {
                return;
            }

            switch (type)
            {
            case MouseOperationType.Move:
                MouseMove(location);
                break;

            case MouseOperationType.Down:
                MouseDown(location);
                break;

            case MouseOperationType.Up:
                MouseUp(location);
                break;

            case MouseOperationType.Leave:
                MouseLeave(location);
                break;

            default:
                break;
            }
        }
 public void MouseOperation(Point location, MouseOperationType type)
 {
     closeBtn.MouseOperation(location, type);
     if (maxBtn != null && maxBtn.Visible)
         maxBtn.MouseOperation(location, type);
     if (resBtn != null && resBtn.Visible)
         resBtn.MouseOperation(location, type);
     if (minBtn != null)
         minBtn.MouseOperation(location, type);
 }
Example #4
0
 public void MouseOperation(Point location, MouseOperationType type)
 {
     closeBtn.MouseOperation(location, type);
     if (maxBtn != null && maxBtn.Visible)
     {
         maxBtn.MouseOperation(location, type);
     }
     if (resBtn != null && resBtn.Visible)
     {
         resBtn.MouseOperation(location, type);
     }
     if (minBtn != null)
     {
         minBtn.MouseOperation(location, type);
     }
 }
 private void SetMouseType(Point loc, MouseOperationType mtype)
 {
     closeBtn.MouseOperation(loc, mtype);
     if (maxBtn != null && maxBtn.Visible)
     {
         maxBtn.MouseOperation(loc, mtype);
     }
     if (resBtn != null && resBtn.Visible)
     {
         resBtn.MouseOperation(loc, mtype);
     }
     if (minBtn != null)
     {
         minBtn.MouseOperation(loc, mtype);
     }
 }
Example #6
0
 public CaptureMouseOperation(MouseOperationType mouseOperation, MouseEventType mouseEventType)
     : base(mouseOperation, mouseEventType)
 {
 }
 public BaseMouseOperation(MouseOperationType mouseOperation, MouseEventType mouseEventType)
 {
     OperationType     = mouseOperation;
     SupportMouseEvent = mouseEventType;
 }
        /// <summary>
        /// 处理鼠标事件。该方法会触发一些click事件,重刷一些按钮等
        /// </summary>
        /// <param name="location"></param>
        /// <param name="type"></param>
        public void MouseOperation(Point location, MouseOperationType type)
        {
            //if (type == MouseOperationType.Up)
            _lastMouseUpLocation = location;
            //else
            //    _lastMouseUpLocation = Point.Empty;

            if (ShowNewTabBtn)
                _newTabBtn.MouseOperation(location, type);
            if (_hiddenTabsCount > 0 || AlwaysShowListAllBtn)
                _listAllBtn.MouseOperation(location, type);
            foreach (MdiGMTabItem tab in _listTabItems)
            {
                if (!tab.IsHidden)
                    tab.CloseBtn.MouseOperation(location, type);
            }

            switch (type)
            {
                case MouseOperationType.Down:
                    MouseOperationDown(location);
                    break;

                case MouseOperationType.Up:
                    MouseOperationUp(location);
                    break;
            }
        }
 public void MouseOperation(Point location, MouseOperationType type)
 {
     MouseOperation(new MouseEventArgs(MouseButtons.None, 0, location.X, location.Y, 0), type);
 }
Example #10
0
 public void MouseOperation(MouseEventArgs e, MouseOperationType type)
 {
     if (!Enabled || !Visible)
         return;
     switch (type)
     {
         case MouseOperationType.Move:
             OnMouseMove(e);
             break;
         case MouseOperationType.Down:
             OnMouseDown(e);
             break;
         case MouseOperationType.Up:
             OnMouseUp(e);
             break;
         case MouseOperationType.Leave:
             OnMouseLeave(e);
             break;
         case MouseOperationType.Wheel:
             OnMouseWheel(e);
             break;
     }
 }