
CodePudding user response:
Novice ah, that we will not introduce you to what MVVM, data binding, a state machine class of senior stuff, global variables are not out, even in the click event once get theprivate void button1_Click (object sender, EventArgs e)
{
The object tag=for. The tag;
int i=0;
If (tag!=null)
{
I=(int) tag;
I=(I + 1) % 3.
}
The switch (I)
{
Case 0:
For the BackColor=Color. White;
break;
Case 1:
For the BackColor=Color. Red;
break;
Case 2:
For the BackColor=Color. Blue;
break;
Default:
break;
}
For the. Tag=I;
}