Ejemplo n.º 1
0
 public void ShowColorDialog()
 {
     using (ColorPickerForm dialogColor = new ColorPickerForm(Color))
     {
         if (dialogColor.ShowDialog() == DialogResult.OK)
         {
             Color = dialogColor.NewColor;
         }
     }
 }
Ejemplo n.º 2
0
        public static Color GetColor(Color currentColor)
        {
            using (ColorPickerForm dialog = new ColorPickerForm(currentColor))
            {
                dialog.rbSaturation.Checked = true;

                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    return(dialog.NewColor);
                }
            }

            return(currentColor);
        }