private void exitButton_Click(object sender, EventArgs e) { if (resultListBox.Items.Count > 0) { var resultForm = new ResultForm(); resultForm.ShowResult(qmarker); resultForm.Owner = this; resultForm.Show(); resultForm.FormClosed += new FormClosedEventHandler(resultForm_FormClosed); } else { InitializePlayMode(); } }