private void GameState_GameEnded(object sender, EventArgs e) { MethodInvoker gameEndedHandler = () => { mainLoop.Running = false; MessageBox.Show(MainWindow, "Game Ended!", "This is the end...", MessageBoxButtons.OK, MessageBoxIcon.Information); CtrlInstance = new StartingMenu(); }; mainWindow.Invoke(gameEndedHandler); }
private void Return_Click(object sender, EventArgs e) { CtrlInstance = new StartingMenu(); }