ComponentFactory.Krypton.Toolkit.TrackPositionController.MouseMove C# (CSharp) Method

MouseMove() public method

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.
return void
        public virtual void MouseMove(Control c, Point pt)
        {
            if (_captured)
            {
                // Ignore multiple calls with the same point
                if ((_lastMovePt == null) || (_lastMovePt != pt))
                {
                    _lastMovePt = pt;

                    // Find the new target value given mouse position
                    int newTargetValue = _drawTB.NearestValueFromPoint(pt);

                    // If this is a change in value then update now
                    if (_drawTB.ViewDrawTrackBar.Value != newTargetValue)
                        _drawTB.ViewDrawTrackBar.ScrollValue = Math.Max(_drawTB.ViewDrawTrackBar.Minimum, Math.Min(newTargetValue, _drawTB.ViewDrawTrackBar.Maximum));
                }
            }
        }