Nuaj.Cirrus.Utility.IntegerTrackbarControl.OnMouseDown C# (CSharp) Method

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void
        protected override void OnMouseDown( MouseEventArgs e )
        {
            base.OnMouseDown( e );

            if ( e.Button != MouseButtons.Left )
                return;
            if ( !m_SliderRectangle.Contains( e.X, e.Y ) )
                return;

            m_bSliderDragging = true;
            m_StartValue = Value;

            Focus();

            // Notify of the start of value change
            if ( SliderDragStart != null )
                SliderDragStart( this );

            // Simulate a move so we update the value
            OnMouseMove( e );
        }