public static DialogResult Show() { pauseForm = new PauseForm(); pauseForm.StartPosition = FormStartPosition.CenterParent; pauseForm.ShowDialog(); return(buttonResult); }
public void Pause() { if (gameTimer.Enabled == true) { gameTimer.Enabled = false; DialogResult dr = PauseForm.Show(); if (dr == DialogResult.Cancel) { gameTimer.Enabled = true; } else if (dr == DialogResult.Abort) { Form form = this.FindForm(); MainScreen ms = new MainScreen(); form.Controls.Add(ms); form.Controls.Remove(this); } } }