private void messageListBox_SelectedIndexChanged(object sender, EventArgs e) { int messageIndex = ((ListBox)sender).SelectedIndex; if (messageIndex < messageList.Count && this.showMessageForm == null) { Email message = this.messageList[messageIndex]; showMessageForm = new ShowMessageForm(transport, message, message.Confirmation); showMessageForm.Show(); showMessageForm.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.onShowMessageFormClose); } this.messageList[messageIndex].Confirmation = false; }
private void onShowMessageFormClose(object sender, EventArgs e) { showMessageForm = null; }