From 614e17605bc3197f941baec66dc2525cda991398 Mon Sep 17 00:00:00 2001 From: gamosoft_cp Date: Wed, 1 May 2013 19:30:43 +0000 Subject: [PATCH] Changed label. Added check to verify if sending email notifications or not (TODO). --- .../AppointmentsControl.Designer.cs | 3 ++- Outlook2013TodoAddIn/ThisAddIn.cs | 17 +++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Outlook2013TodoAddIn/AppointmentsControl.Designer.cs b/Outlook2013TodoAddIn/AppointmentsControl.Designer.cs index bf3f555..b617820 100644 --- a/Outlook2013TodoAddIn/AppointmentsControl.Designer.cs +++ b/Outlook2013TodoAddIn/AppointmentsControl.Designer.cs @@ -156,7 +156,7 @@ this.grpRefresh.Size = new System.Drawing.Size(226, 66); this.grpRefresh.TabIndex = 3; this.grpRefresh.TabStop = false; - this.grpRefresh.Text = "Days:"; + this.grpRefresh.Text = "Configuration:"; // // apptCalendar // @@ -172,6 +172,7 @@ this.apptCalendar.Name = "apptCalendar"; this.apptCalendar.OtherMonthForeColor = System.Drawing.Color.LightGray; this.apptCalendar.SelectedBackColor = System.Drawing.Color.LightBlue; + this.apptCalendar.SelectedDate = new System.DateTime(2013, 5, 1, 0, 0, 0, 0); this.apptCalendar.SelectedForeColor = System.Drawing.Color.Blue; this.apptCalendar.Size = new System.Drawing.Size(226, 242); this.apptCalendar.TabIndex = 1; diff --git a/Outlook2013TodoAddIn/ThisAddIn.cs b/Outlook2013TodoAddIn/ThisAddIn.cs index 352c21c..a0c852e 100644 --- a/Outlook2013TodoAddIn/ThisAddIn.cs +++ b/Outlook2013TodoAddIn/ThisAddIn.cs @@ -61,13 +61,18 @@ namespace Outlook2013TodoAddIn /// ID of the email private void Application_NewMailEx(string EntryIDCollection) { - Microsoft.Office.Interop.Outlook.MailItem newMail = Globals.ThisAddIn.Application.Session.GetItemFromID(EntryIDCollection) as Microsoft.Office.Interop.Outlook.MailItem; - if (newMail != null) + // TODO: Make this optional, still hook the event as this setting will be able to be enabled/disabled by user + if (true) { - NewMailAlert nm = new NewMailAlert(newMail, Properties.Settings.Default.DisplayTimeOut); - // Show the popup without stealing focus - SoundHelper.sndPlaySoundW(SoundHelper.MailBeep, SoundHelper.SND_NODEFAULT); - nm.ShowPopup(); + + Microsoft.Office.Interop.Outlook.MailItem newMail = Globals.ThisAddIn.Application.Session.GetItemFromID(EntryIDCollection) as Microsoft.Office.Interop.Outlook.MailItem; + if (newMail != null) + { + NewMailAlert nm = new NewMailAlert(newMail, Properties.Settings.Default.DisplayTimeOut); + // Show the popup without stealing focus + SoundHelper.sndPlaySoundW(SoundHelper.MailBeep, SoundHelper.SND_NODEFAULT); + nm.ShowPopup(); + } } }