Esempio n. 1
0
 public void SetButtonColor(Button btPassButton, Color cPassColor)
 {
     if (btPassButton.InvokeRequired)
     {
         SetButtonColorCallback d = new SetButtonColorCallback(SetButtonColor);
         this.Invoke(d, new object[] { btPassButton, cPassColor });
     }
     else
     {
         btPassButton.BackColor = cPassColor;
         btPassButton.FlatAppearance.MouseOverBackColor = cPassColor;
     }
 }
Esempio n. 2
0
 private void SetButtonColor(Color theColor, bool forground, Button theButton)
 {
     if (theButton.InvokeRequired)
     {
         SetButtonColorCallback d = new SetButtonColorCallback(SetButtonColor);
         this.Invoke(d, new object[] { theColor, forground, theButton });
     }
     else
     {
         if(forground)
             theButton.ForeColor = theColor;
         else
             theButton.BackColor = theColor;
     }
 }