private void PropPanel_Initialize(Panel propertiesPanel, Panel PropertiesBody)
        {
            //PropPanel properties
            PropPanel.Initialize(propertiesPanel);
            PropPanel.Resizable = true;
            PropPanel.Name.Text = "Chart Series";
            PropertiesBody.Controls.Add(PropPanel.Panel);

            panel = PropPanel.Panel;

            panel.Visible = false;

            BuildOptions();
        }
        public void Initialize(Panel propertiesPanel, Panel PropertiesBody)
        {
            //PropPanel properties
            PropPanel.Initialize(propertiesPanel);
            PropPanel.Resizable = true;
            PropPanel.Name.Text = "Brightness And Contrast";
            PropertiesBody.Controls.Add(PropPanel.Panel);

            panel         = PropPanel.Panel;
            panel.Visible = false;
            //Create Interface
            //Prop Panel
            Panel Panel1 = new Panel();

            Panel1.Dock   = DockStyle.Top;
            Panel1.Height = 25;
            PropPanel.Panel.Controls.Add(Panel1);
            Panel1.BringToFront();

            applyToAll.Text            = "Apply to all channels";
            applyToAll.Tag             = "Apply minimum and maximum to \nthe look-up tables of all color channels";
            applyToAll.Width           = TextRenderer.MeasureText(applyToAll.Text, applyToAll.Font).Width + 20;
            applyToAll.Checked         = false;
            applyToAll.Visible         = false;
            autoDetect.Location        = new Point(10, 3);
            applyToAll.MouseHover     += new EventHandler(Control_MouseOver);
            applyToAll.CheckedChanged += new EventHandler(applyToAll_Checked);
            Panel1.Controls.Add(applyToAll);

            autoDetect.Text    = "Auto bounds";
            autoDetect.Tag     = "Automaticly adjust brightness and contrast \nby calculating minimum and maximum for the look-up table";
            autoDetect.Width   = TextRenderer.MeasureText(autoDetect.Text, autoDetect.Font).Width + 20;
            autoDetect.Checked = true;
            int x = autoDetect.Width + 35;

            if (x + 40 > Panel1.Width)
            {
                x = Panel1.Width - 40;
            }
            applyToAll.Location        = new Point(x, 3);
            autoDetect.CheckedChanged += new EventHandler(autoDetect_Checked);
            autoDetect.MouseHover     += new EventHandler(Control_MouseOver);
            Panel1.Controls.Add(autoDetect);
            applyToAll.BringToFront();

            Panel1.Resize += new EventHandler(delegate(object o, EventArgs a)
            {
                int x1 = autoDetect.Width + 35;
                if (x1 + 40 > Panel1.Width)
                {
                    x1 = Panel1.Width - 40;
                }
                applyToAll.Location = new Point(x1, 3);
            });
            //Chart
            ChartArea CA = new ChartArea();

            //CA.BackColor = PropPanel.Body.BackColor;
            CA.BackColor = IA.FileBrowser.BackGroundColor1;

            CA.AxisX.MajorGrid.Enabled     = false;
            CA.AxisY.MajorGrid.Enabled     = false;
            CA.AxisX.MinorGrid.Enabled     = false;
            CA.AxisY.MinorGrid.Enabled     = false;
            CA.AxisX.MajorTickMark.Enabled = false;
            CA.AxisY.MajorTickMark.Enabled = false;
            CA.AxisX.MinorTickMark.Enabled = false;
            CA.AxisY.MinorTickMark.Enabled = false;
            //CA.AxisX.LabelStyle.Enabled = false;
            CA.AxisX.LabelStyle.ForeColor = IA.FileBrowser.ShriftColor1;
            CA.AxisY.LabelStyle.Enabled   = false;
            CA.AxisX.LineColor            = PropPanel.Body.BackColor;
            CA.AxisY.LineColor            = PropPanel.Body.BackColor;

            Chart1.ChartAreas.Add(CA);
            Chart1.ChartAreas[0].AxisY.Minimum = 0;
            CA.Visible = true;

            Values.Enabled            = true;
            Values.ChartType          = SeriesChartType.SplineArea;
            Values.BorderWidth        = 1;
            Values.BorderColor        = Color.White;
            Values.BackGradientStyle  = System.Windows.Forms.DataVisualization.Charting.GradientStyle.LeftRight;
            Values.BackSecondaryColor = Color.White;
            Values.Color = Color.Black;
            Chart1.Series.Add(Values);

            ValuesUp.Enabled     = true;
            ValuesUp.ChartType   = SeriesChartType.SplineArea;
            ValuesUp.BorderWidth = 1;
            ValuesUp.BorderColor = Color.White;
            ValuesUp.Color       = Color.White;
            Chart1.Series.Add(ValuesUp);

            ValuesDown.Enabled     = true;
            ValuesDown.ChartType   = SeriesChartType.SplineArea;
            ValuesDown.BorderWidth = 1;
            ValuesDown.BorderColor = Color.White;
            ValuesDown.Color       = Color.Black;
            Chart1.Series.Add(ValuesDown);

            MinSer.Enabled     = true;
            MinSer.ChartType   = SeriesChartType.Spline;
            MinSer.BorderWidth = 1;
            MinSer.Color       = Color.White;
            MinSer.BorderColor = Color.White;
            Chart1.Series.Add(MinSer);

            MaxSer.Enabled     = true;
            MaxSer.ChartType   = SeriesChartType.Spline;
            MaxSer.BorderWidth = 1;
            MaxSer.Color       = Color.White;
            MaxSer.BorderColor = Color.White;
            Chart1.Series.Add(MaxSer);

            Chart1.Dock      = DockStyle.Fill;
            Chart1.BackColor = PropPanel.Body.BackColor;
            PropPanel.Panel.Controls.Add(Chart1);
            Chart1.MouseMove  += new MouseEventHandler(Chart1_MouseMove);
            Chart1.MouseDown  += new MouseEventHandler(Chart1_MouseDown);
            Chart1.MouseUp    += new MouseEventHandler(Chart1_MouseUp);
            Chart1.MouseClick += new MouseEventHandler(Chart1_MouseClick);
            //Chart1.MouseHover += new MouseEventHandler(Chart1_MouseHover);
            Chart1.BringToFront();
        }
        public void Initialize(Panel propertiesPanel, Panel PropertiesBody)
        {
            //PropPanel properties
            PropPanel.Initialize(propertiesPanel);
            PropPanel.Resizable = true;
            PropPanel.Name.Text = "Brightness And Contrast";
            PropertiesBody.Controls.Add(PropPanel.Panel);

            panel         = PropPanel.Panel;
            panel.Visible = false;
            //Create Interface
            //Prop Panel
            Panel Panel1 = new Panel();

            Panel1.Dock   = DockStyle.Top;
            Panel1.Height = 25;
            PropPanel.Panel.Controls.Add(Panel1);
            Panel1.BringToFront();

            applyToAll.Text            = "Apply to all channels";
            applyToAll.Tag             = "Apply minimum and maximum to \nthe look-up tables of all color channels";
            applyToAll.Width           = TextRenderer.MeasureText(applyToAll.Text, applyToAll.Font).Width + 20;
            applyToAll.Checked         = false;
            applyToAll.Visible         = false;
            autoDetect.Location        = new Point(10, 3);
            applyToAll.MouseHover     += new EventHandler(Control_MouseOver);
            applyToAll.CheckedChanged += new EventHandler(applyToAll_Checked);
            Panel1.Controls.Add(applyToAll);

            autoDetect.Text    = "Auto bounds";
            autoDetect.Tag     = "Automaticly adjust brightness and contrast \nby calculating minimum and maximum for the look-up table";
            autoDetect.Width   = TextRenderer.MeasureText(autoDetect.Text, autoDetect.Font).Width + 20;
            autoDetect.Checked = true;
            int x = autoDetect.Width + 35;

            if (x + 40 > Panel1.Width)
            {
                x = Panel1.Width - 40;
            }
            applyToAll.Location        = new Point(x, 3);
            autoDetect.CheckedChanged += new EventHandler(autoDetect_Checked);
            autoDetect.MouseHover     += new EventHandler(Control_MouseOver);
            Panel1.Controls.Add(autoDetect);
            applyToAll.BringToFront();

            Panel1.Resize += new EventHandler(delegate(object o, EventArgs a)
            {
                int x1 = autoDetect.Width + 35;
                if (x1 + 40 > Panel1.Width)
                {
                    x1 = Panel1.Width - 40;
                }
                applyToAll.Location = new Point(x1, 3);
            });
            //Chart
            BrightnessAndContrast_ChartPanel.BrightnessAndContrast_Chart CA = Chart1.CA;
            //CA.BackColor = PropPanel.Body.BackColor;
            CA.BackGroundColor = IA.FileBrowser.BackGroundColor1;
            CA.ShowMinAndMax   = true;

            CA.Visible = true;

            Values.Enabled            = true;
            Values.UseGradientStyle   = true;
            Values.BorderColor        = Color.White;
            Values.BackSecondaryColor = Color.White;
            Values.Color = Color.Black;
            Chart1.Series.Add(Values);

            Chart1.Dock      = DockStyle.Fill;
            Chart1.BackColor = PropPanel.Body.BackColor;

            this.FormBrightnessContrast = new Form_auxiliary(this.panel, 10, 50, -10, -50);
            this.FormBrightnessContrast.Controls.Add(Chart1);
            //this.FormBrightnessContrast.Show();


            //PropPanel.Panel.Controls.Add(Chart1);
            CA.MouseMove  += new MouseEventHandler(Chart1_MouseMove);
            CA.MouseDown  += new MouseEventHandler(Chart1_MouseDown);
            CA.MouseUp    += new MouseEventHandler(Chart1_MouseUp);
            CA.MouseClick += new MouseEventHandler(Chart1_MouseClick);
            //Chart1.MouseHover += new MouseEventHandler(Chart1_MouseHover);
            Chart1.BringToFront();
        }