You need three things:
- A button click handler (assuming you are clicking a single button)
- A class-scoped integer that counts the number of clicks
- A series or if/else statements or a switch statement with cases that change the action based on the number of your click.
Light code sample:
private int _btnClickCount = 0; // your class-scoped variable
// your button click handler
private void SomeButtonClicked(object sender, EventArgs args) {
if (_btnClickCount == 0)
// do something
else if (_btnClickCount == 1)
// do something else
// etc.
_btnClickCount++;
}