private void btn_Respond_Click(object sender, EventArgs e) { if (lbox_Questions.SelectedIndex != -1) { var foo = lbox_Questions.SelectedItem; Question question = foo as Question; Form_AcceptQuestion dialog = new Form_AcceptQuestion(currentuser, question); dialog.ShowDialog(); } else { MessageBox.Show("U heeft geen vraag gekozen"); } }
private void btn_Respond_Click(object sender, EventArgs e) { if (lbox_Questions.SelectedIndex != -1) { var foo = lbox_Questions.SelectedItem; Question question = foo as Question; Form_AcceptQuestion dialog = new Form_AcceptQuestion(currentuser, question); dialog.ShowDialog(); } else { MessageBox.Show("U heeft geen vraag gekozen"); } }