Example #1
0
        private void lvMessages_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (changing)
            {
                return;
            }

            changing = true;
            try {
                EnableControls(false);

                if (imap.Active && lvMessages.SelectedItems.Count > 0)
                {
                    imap.RetrieveMessage(Convert.ToInt32(lvMessages.SelectedItems[0].SubItems[4].Text), mailMessage);

                    edtFrom.Text    = mailMessage.From.FullAddress;
                    edtSubject.Text = mailMessage.Subject;
                    memBody.Lines   = mailMessage.MessageText;
                }
                else
                {
                    ClearMessage();
                }
            }
            finally {
                changing = false;
                EnableControls(true);
            }
        }
Example #2
0
        private void lvMessages_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (imap41.Active && lvMessages.SelectedItems.Count > 0)
            {
                imap41.RetrieveMessage(Convert.ToInt32(lvMessages.SelectedItems[0].SubItems[4].Text), mailMessage1);

                edtFrom.Text    = mailMessage1.From.FullAddress;
                edtSubject.Text = mailMessage1.Subject;
                memBody.Lines   = mailMessage1.MessageText;
            }
            else
            {
                ClearMessage();
            }
        }
Example #3
0
        private void lvMessages_DoubleClick(object sender, System.EventArgs e)
        {
            if (!imap41.Active)
            {
                return;
            }

            if (lvMessages.SelectedItems.Count > 0)
            {
                imap41.RetrieveMessage(Convert.ToInt32(lvMessages.SelectedItems[0].Text), mailMessage1);
                imap41.SetMessageFlags(Convert.ToInt32(lvMessages.SelectedItems[0].Text),
                                       SetFlagsMethod.Add, MailMessageFlags.Seen);

                MessageFrm.ShowMessage(mailMessage1);
                tvFolders_SelectedIndexChanged(null, null);
            }
        }