private void btnMailReply_Click(object sender, EventArgs e) { if (dgvUnreadMails.CurrentRow != null) { try { MyOutlookItem currentitem = (MyOutlookItem)dgvUnreadMails.CurrentRow.DataBoundItem; currentitem.RunMethod("Reply"); } catch (System.Exception ex) { MessageShow.ShowException(this, ex); } } }
private void dgvUnreadMails_CellDoubleClick(object sender, System.Windows.Forms.DataGridViewCellEventArgs e) { if (dgvUnreadMails.CurrentRow != null) { try { MyOutlookItem currentitem = (MyOutlookItem)dgvUnreadMails.CurrentRow.DataBoundItem; currentitem.RunMethod("Display"); } catch (System.Exception ex) { MessageShow.ShowException(this, ex); } } }
private void btnMailDelete_Click(object sender, EventArgs e) { if (dgvUnreadMails.CurrentRow != null) { try { MyOutlookItem currentitem = (MyOutlookItem)dgvUnreadMails.CurrentRow.DataBoundItem; currentitem.SetProperty("Unread", false); currentitem.RunMethod("Delete"); RefreshMails(); } catch (System.Exception ex) { MessageShow.ShowException(this, ex); } } }