Ejemplo n.º 1
0
        protected internal override void OnMouseMoved(BasicMouseEventArgs e)
        {
            if (xpos == null || ypos == null)
            {
                return;
            }
            int indX = GetSeparatorInd(xpos, e.X);
            int indY = GetSeparatorInd(ypos, e.Y);

            if (indX >= 0)
            {
                indY = -1;
            }
            if (indX >= 0 || indY >= 0)
            {
                Cursor            = indX >= 0 ? Cursors.VSplit : Cursors.HSplit;
                currentComponentX = -1;
                currentComponentY = -1;
            }
            else
            {
                ResetCursor();
                currentComponentX = GetCurrentComponentInd(xpos, e.X);
                currentComponentY = GetCurrentComponentInd(ypos, e.Y);
                Tuple <int, int> key = new Tuple <int, int>(currentComponentY, currentComponentX);
                if (components.ContainsKey(key))
                {
                    BasicView v = components[key];
                    v.OnMouseMoved(new BasicMouseEventArgs(e, xpos[currentComponentX], ypos[currentComponentY],
                                                           widths[currentComponentX], heights[currentComponentY]));
                }
            }
        }
Ejemplo n.º 2
0
 protected override sealed void OnMouseMove(MouseEventArgs e)
 {
     SetStyle(ControlStyles.Selectable, true);
     Focus();
     base.OnMouseMove(e);
     if (mouseDown)
     {
         view.OnMouseDragged(new BasicMouseEventArgs(e, Width, Height, () => ModifierKeys, ViewToolTip));
     }
     else
     {
         view.OnMouseMoved(new BasicMouseEventArgs(e, Width, Height, () => ModifierKeys, ViewToolTip));
     }
 }