private void btnClose_Click(object sender, EventArgs e) { Form MainForm = new ChoosingExerciseForm(connection, currentUser, exerciseTopic); MainForm.Show(); this.Enabled = false; this.Hide(); }
private void btnPlayGame_Click(object sender, EventArgs e) { int index = cbxTopicList.SelectedItem.ToString().IndexOf('-'); topic = cbxTopicList.SelectedItem.ToString().Substring(0, index); this.Enabled = false; this.Hide(); if (userType == "Student") { Form ChoosingExerciseForm = new ChoosingExerciseForm(connection, user, topic, true); ChoosingExerciseForm.Show(); } else { Form ChoosingExerciseForm = new ChoosingExerciseForm(connection, user, topic, false); ChoosingExerciseForm.Show(); } }