private void chooseColourButton_Click(object sender, EventArgs e)
        {
            //Create a colorwheel dialog and set its initial selected color to the current selected color-----------------------------------
            ColorChooserCSharp.ColorChooser1 chooser = new ColorChooserCSharp.ColorChooser1();
            chooser.TopMost = Properties.Settings.Default.alwaysOnTop;
            chooser.RGB = new ColorHandler.RGB((int)red, (int)green, (int)blue);
            chooser.ShowDialog();

            //Get colour results form the dialog and save them in the state and update the colour panel
            if (chooser.saveChanges)
            {
                green = chooser.RGBOUT.Green;
                red = chooser.RGBOUT.Red;
                blue = chooser.RGBOUT.Blue;
                panel1.BackColor = Color.FromArgb(255, red, green, blue);
                d.SelectedIndex = -1;
            }
        }
Exemple #2
0
        private void chooseColourButton_Click(object sender, EventArgs e)
        {
            //Create a colorwheel dialog and set its initial selected color to the current selected color-----------------------------------
            ColorChooserCSharp.ColorChooser1 chooser = new ColorChooserCSharp.ColorChooser1();
            chooser.TopMost = Properties.Settings.Default.alwaysOnTop;
            chooser.RGB     = new ColorHandler.RGB((int)red, (int)green, (int)blue);
            chooser.ShowDialog();

            //Get colour results form the dialog and save them in the state and update the colour panel
            if (chooser.saveChanges)
            {
                green            = chooser.RGBOUT.Green;
                red              = chooser.RGBOUT.Red;
                blue             = chooser.RGBOUT.Blue;
                panel1.BackColor = Color.FromArgb(255, red, green, blue);
                d.SelectedIndex  = -1;
            }
        }