private void answerSubmitButton_Click(object sender, EventArgs e) { if (postRichTextBox.Text.Length == 0) { MessageBox.Show("Fill in all the information required before you submit an answer."); } else { controller.SubmitAnswer(postRichTextBox.Rtf); postRichTextBox.Text = ""; List <UInt32> ref_ids = new List <UInt32>(); foreach (int i in addReferenceListBox.SelectedIndices) { ref_ids.Add(resourceIds[i]); } controller.AddReference(ref_ids); for (int i = 0; i < addReferenceListBox.Items.Count; i++) { addReferenceListBox.SetSelected(i, false); } } }