private void mnuAdd_Click(object sender, EventArgs e) { if (password == null) { password = new Password(); password.FormClosed += (a, b) => quizSelection = null; password.Show(); } if (password != null) { password.Focus(); } }
//======================================== // Menu Afhandeling //======================================== private void mnuNew_Click(object sender, EventArgs e) { if (quizSelection == null) { quizSelection = new QuizSelection(); quizSelection.FormClosed += (a, b) => quizSelection = null; quizSelection.Show(); } if (quizSelection != null) { quizSelection.Focus(); } }
//======================================== // Menu Afhandeling //======================================== private void mnuNew_Click(object sender, EventArgs e) { if (quizSelection == null) //als er geen venster quizSelection open is, open een nieuwe { quizSelection = new QuizSelection(); quizSelection.FormClosed += (a, b) => quizSelection = null; quizSelection.Show(); } if (quizSelection != null) //als er wel een venster quizSelection open is, focus daar op { quizSelection.Focus(); } }