using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;


namespace WindowsFormsApp1
{
    
    public partial class Form1 : Form
    {
        RangeSlider rs;
        public Form1()
        {
            InitializeComponent();
            rs = new RangeSlider();
            rs.Location = new Point(50, 50);
            rs.Size = new Size(200, 50);
            this.Controls.Add(rs);

            //CustomTrackBar TrackBar1 = new CustomTrackBar(19,
            //    new Size(300, 50));
            //this.Width = 500;
            //this.Controls.Add(TrackBar1);

            BetterRangeSlider brs = new BetterRangeSlider();
            brs.Location = new Point(200, 200);
            brs.Size = new Size(200, 50);
            
            this.Controls.Add(brs);
        }
    }



    //public class RangeSlider : Control
    //{
    //    public int Minimum { get; set; } = 0;
    //    public int Maximum { get; set; } = 100;
    //    public int MinValue { get; set; } = 20;
    //    public int MaxValue { get; set; } = 80;

    //    protected override void OnPaint(PaintEventArgs e)
    //    {
    //        // 1. Use TrackBarRenderer.DrawHorizontalTrack to draw the bar
    //        // 2. Calculate pixel positions for MinValue and MaxValue
    //        // 3. Use TrackBarRenderer.DrawHorizontalThumb to draw both thumbs
    //    }

    //    protected override void OnMouseDown(MouseEventArgs e)
    //    {
    //        // Detect if mouse is over Min thumb or Max thumb
    //    }
    //}
}
