privateoid allbtn_click(object sender, EventArgs e)
{
if (((Button)sender).BackColor == Color.Transparent) // if btn colour is transparent then allows colour to change
if (color == true) //starts if statement
((
Button)sender).BackColor = Color.Red; //sets button to red
}
else // else statement
Button)sender).BackColor = Color.Yellow; //sets button to yellow
color = !color;
// when colour is true, sets colour to false