private void MessagesListView_CellClick(object sender, BrightIdeasSoftware.CellClickEventArgs e) { MessageViewRichTextBox.Clear(); GMail selectedMail = (GMail)MessagesListView.SelectedObject; MessageViewRichTextBox.Text = selectedMail.Body; BodyHeaderRichTextBox.Text = "\n" + selectedMail.From + " - " + selectedMail.Subject + " - " + selectedMail.Date; BodyWebBrowser.DocumentText = selectedMail.HTMLBody; }
private void LabelsListView_CellClick(object sender, BrightIdeasSoftware.CellClickEventArgs e) { MessagesListView.ClearObjects(); string selectedLabelId = LabelsListView.SelectedItem.Text; IList <Google.Apis.Gmail.v1.Data.Message> currentLabelMessages = gmmailAPIhandler.ListMessages(selectedLabelId); IDictionary <string, GMail> extractedMails = GMail.CreateGmailMessage(currentLabelMessages, gmmailAPIhandler); List <GMail> mailList = new List <GMail>(); foreach (KeyValuePair <string, GMail> mail in extractedMails) { mailList.Add(mail.Value); } MessagesListView.SetObjects(mailList); }