When I click a button before it runs the whole method attached to itself, I want the button to reset the whole content. So if i Use Application.Restart();
it would just restart the application but does not run the rest. How will I be able to solve this problem?
The reason why I want to restart the application is there are so many variables and I want to reset all of them.
This reseting process has to be done by clicking a particular button. However that button has heaps of functions, running the Application.Restart();
method at anywhere on this method.
causes this method not to execute.
So basically I want this method to restart all variables and then run the rest(starting from enableButtons();
)
private void puzzleToolStripMenuItem_Click(object sender, EventArgs e) {
Application.Restart();
enableButtons();
puzzleDataMethod();
MessageBox.Show...