ComponentFactory.Krypton.Toolkit.SeparatorController.MouseMove C# (CSharp) Méthode

MouseMove() public méthode

Mouse has moved inside the view.
public MouseMove ( Control c, Point pt ) : void
c System.Windows.Forms.Control Reference to the source control instance.
pt Point Mouse position relative to control.
Résultat void
        public override void MouseMove(Control c, Point pt)
        {
            // If the separator is allowed to be moved by the user
            if (_source.SeparatorCanMove)
            {
                // Cursor depends on orientation direction
                if (_source.SeparatorOrientation == Orientation.Vertical)
                    _source.SeparatorControl.Cursor = (_splitCursors ? _cursorVSplit : _cursorVMove);
                else
                    _source.SeparatorControl.Cursor = (_splitCursors ? _cursorHSplit : _cursorHMove);
            }

            // If we are currently capturing input
            if (_moving)
            {
                // Update the split indicator to new position
                Point splitPt = RecalcClient(pt);
                DrawSeparatorReposition(splitPt);

                // Callback to the source to show movement
                if (_source.SeparatorMoving(pt, splitPt))
                    AbortMoving();
            }

            // Let base class do standard processing
            base.MouseMove(c, pt);
        }

Usage Example

Exemple #1
0
        internal void DesignMouseMove(Point pt)
        {
            // Remember last point encountered
            _designLastPt = pt;

            // Pass message directly onto the separator controller
            _separatorController.MouseMove(this, pt);
        }