Пример #1
0
        private void SetThumbState(Point location, System.Windows.Forms.VisualStyles.TrackBarThumbState newState)
        {
            Rectangle leftThumbRect  = this.GetLeftThumbRectangle();
            Rectangle rightThumbRect = this.GetRightThumbRectangle();

            if (leftThumbRect.Contains(location))
            {
                leftThumbState = newState;
            }
            else
            {
                if (this.SelectedThumb == Thumbs.Left)
                {
                    leftThumbState = System.Windows.Forms.VisualStyles.TrackBarThumbState.Hot;
                }
                else
                {
                    leftThumbState = System.Windows.Forms.VisualStyles.TrackBarThumbState.Normal;
                }
            }

            if (rightThumbRect.Contains(location))
            {
                rightThumbState = newState;
            }
            else
            {
                if (this.SelectedThumb == Thumbs.Right)
                {
                    rightThumbState = System.Windows.Forms.VisualStyles.TrackBarThumbState.Hot;
                }
                else
                {
                    rightThumbState = System.Windows.Forms.VisualStyles.TrackBarThumbState.Normal;
                }
            }
        }
 public static System.Drawing.Size GetBottomPointingThumbSize(System.Drawing.Graphics g, System.Windows.Forms.VisualStyles.TrackBarThumbState state)
 {
 }
 public static void DrawBottomPointingThumb(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.VisualStyles.TrackBarThumbState state)
 {
 }