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;

namespace DominationStudioCLI
{
    public partial class ColorTrack : Form
    {
        public ColorTrack()
        {
            InitializeComponent();
            trackBar1_ValueChanged(null, null);

            trackBar1.Value = 0;
            trackBar2.Value = 256;
            trackBar3.Value = 0;
            trackBar4.Value = 256;
            trackBar5.Value = 0;
            trackBar6.Value = 256;
        }

        public void InitMorp()
        {
            trackBar1.Value = 2;
            trackBar2.Value = 2;
            trackBar3.Value = 2;
            trackBar4.Value = 2;
            trackBar1.Minimum = 1;
            trackBar2.Minimum = 1;
            trackBar3.Minimum = 1;
            trackBar4.Minimum = 1;
        }

        public Tuple<double, double, double> GetMin()
        {
            return new Tuple<double, double, double>(trackBar1.Value, trackBar3.Value, trackBar5.Value);
        }

        public Tuple<double, double, double> GetMax()
        {
            return new Tuple<double, double, double>(trackBar2.Value, trackBar4.Value, trackBar6.Value);
        }

        private void trackBar1_ValueChanged(object sender, EventArgs e)
        {
            label1.Text = GetMin() + " " + GetMax();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            trackBar1.Value = 0;
            trackBar3.Value = 0;
            trackBar5.Value = 0;
            trackBar2.Value = 256;
            trackBar4.Value = 256;
            trackBar6.Value = 256;
        }
    }
}
