private void btn_QuestionDetails_Click(object sender, EventArgs e) { if (lbox_MyQuestions.SelectedIndex != -1) { var foo = lbox_MyQuestions.SelectedItem; Question question = foo as Question; Review review = foo as Review; Form_QuestionDetails dialog = new Form_QuestionDetails(question, currentuser as Client, review); timer_Refresh.Stop(); dialog.ShowDialog(); RefreshInterface(); timer_Refresh.Start(); } else { MessageBox.Show("U heeft geen vraag gekozen"); } }
private void btn_QuestionDetails_Click(object sender, EventArgs e) { if (lbox_MyQuestions.SelectedIndex != -1) { var foo = lbox_MyQuestions.SelectedItem; Question question = foo as Question; Review review = foo as Review; Form_QuestionDetails dialog = new Form_QuestionDetails(question, currentuser as Client,review); timer_Refresh.Stop(); dialog.ShowDialog(); RefreshInterface(); timer_Refresh.Start(); } else { MessageBox.Show("U heeft geen vraag gekozen"); } }