Ejemplo n.º 1
0
 private void checker_CheckStateChanged(object sender, EventArgs e)
 {
     if (checker.CheckState == CheckState.Unchecked)
     {
         button.BackColor = Color.Empty;
         theColor         = Color.Empty;
         button.Enabled   = false;
         if (userAct)
         {
             userChange(this);
         }
     }
     if (checker.CheckState == CheckState.Checked && userAct == true)
     {
         ColorGeter.Color = BackColor;
         if (ColorGeter.ShowDialog() == DialogResult.OK)
         {
             button.BackColor = ColorGeter.Color;
             theColor         = ColorGeter.Color;
             button.Enabled   = true;
             userChange(this);
         }
         else
         {
             checker.CheckState = CheckState.Unchecked;
         }
     }
 }
Ejemplo n.º 2
0
 private void button_Click(object sender, EventArgs e)
 {
     ColorGeter.Color = button.BackColor;
     if (ColorGeter.ShowDialog() == DialogResult.OK)
     {
         button.BackColor = ColorGeter.Color;
         theColor         = ColorGeter.Color;
         userChange(this);
     }
 }