From 2c225b233ce345e9eeaa05fc10f2c4d8b9b204bc Mon Sep 17 00:00:00 2001 From: gamosoft_cp Date: Thu, 11 Dec 2014 22:47:21 +0000 Subject: [PATCH] Added configurable email alert timeout (1-10 seconds) --- .../Forms/FormConfiguration.Designer.cs | 43 ++++++++++++++++++- .../Forms/FormConfiguration.cs | 2 + 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/Outlook2013TodoAddIn/Forms/FormConfiguration.Designer.cs b/Outlook2013TodoAddIn/Forms/FormConfiguration.Designer.cs index 5a0097f..a5c13b3 100644 --- a/Outlook2013TodoAddIn/Forms/FormConfiguration.Designer.cs +++ b/Outlook2013TodoAddIn/Forms/FormConfiguration.Designer.cs @@ -45,8 +45,11 @@ this.chkShowWeekNumbers = new System.Windows.Forms.CheckBox(); this.pctBoxPayPal = new System.Windows.Forms.PictureBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.numRangeEmailAlertsTimeOut = new System.Windows.Forms.NumericUpDown(); + this.lblSeconds = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.numRangeDays)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pctBoxPayPal)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numRangeEmailAlertsTimeOut)).BeginInit(); this.SuspendLayout(); // // chkMailAlerts @@ -54,9 +57,9 @@ this.chkMailAlerts.AutoSize = true; this.chkMailAlerts.Location = new System.Drawing.Point(45, 94); this.chkMailAlerts.Name = "chkMailAlerts"; - this.chkMailAlerts.Size = new System.Drawing.Size(143, 21); + this.chkMailAlerts.Size = new System.Drawing.Size(95, 21); this.chkMailAlerts.TabIndex = 8; - this.chkMailAlerts.Text = "Enable Mail Alerts"; + this.chkMailAlerts.Text = "Mail Alerts"; this.chkMailAlerts.UseVisualStyleBackColor = true; // // lblRangeDays @@ -211,6 +214,37 @@ "ike the tool and such, or better yet, you can buy me a beer if you wish. ;-) "); this.pctBoxPayPal.Click += new System.EventHandler(this.pictureBox1_Click); // + // numRangeEmailAlertsTimeOut + // + this.numRangeEmailAlertsTimeOut.Location = new System.Drawing.Point(138, 93); + this.numRangeEmailAlertsTimeOut.Maximum = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.numRangeEmailAlertsTimeOut.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numRangeEmailAlertsTimeOut.Name = "numRangeEmailAlertsTimeOut"; + this.numRangeEmailAlertsTimeOut.Size = new System.Drawing.Size(44, 22); + this.numRangeEmailAlertsTimeOut.TabIndex = 22; + this.numRangeEmailAlertsTimeOut.Value = new decimal(new int[] { + 6, + 0, + 0, + 0}); + // + // lblSeconds + // + this.lblSeconds.AutoSize = true; + this.lblSeconds.Location = new System.Drawing.Point(186, 95); + this.lblSeconds.Name = "lblSeconds"; + this.lblSeconds.Size = new System.Drawing.Size(61, 17); + this.lblSeconds.TabIndex = 23; + this.lblSeconds.Text = "seconds"; + // // FormConfiguration // this.AcceptButton = this.btnOK; @@ -218,6 +252,8 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.btnCancel; this.ClientSize = new System.Drawing.Size(282, 482); + this.Controls.Add(this.lblSeconds); + this.Controls.Add(this.numRangeEmailAlertsTimeOut); this.Controls.Add(this.pctBoxPayPal); this.Controls.Add(this.chkShowWeekNumbers); this.Controls.Add(this.chkShowDayNames); @@ -244,6 +280,7 @@ this.Load += new System.EventHandler(this.FormConfiguration_Load); ((System.ComponentModel.ISupportInitialize)(this.numRangeDays)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pctBoxPayPal)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numRangeEmailAlertsTimeOut)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -267,5 +304,7 @@ private System.Windows.Forms.CheckBox chkShowWeekNumbers; private System.Windows.Forms.PictureBox pctBoxPayPal; private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.NumericUpDown numRangeEmailAlertsTimeOut; + private System.Windows.Forms.Label lblSeconds; } } \ No newline at end of file diff --git a/Outlook2013TodoAddIn/Forms/FormConfiguration.cs b/Outlook2013TodoAddIn/Forms/FormConfiguration.cs index 579ffcf..0244e2e 100644 --- a/Outlook2013TodoAddIn/Forms/FormConfiguration.cs +++ b/Outlook2013TodoAddIn/Forms/FormConfiguration.cs @@ -125,6 +125,7 @@ namespace Outlook2013TodoAddIn.Forms { this.numRangeDays.Value = Properties.Settings.Default.NumDays; this.chkMailAlerts.Checked = Properties.Settings.Default.MailAlertsEnabled; + this.numRangeEmailAlertsTimeOut.Value = Properties.Settings.Default.DisplayTimeOut / 1000; this.chkShowPastAppointments.Checked = Properties.Settings.Default.ShowPastAppointments; this.chkFriendlyGroupHeaders.Checked = Properties.Settings.Default.ShowFriendlyGroupHeaders; this.chkShowDayNames.Checked = Properties.Settings.Default.ShowDayNames; @@ -165,6 +166,7 @@ namespace Outlook2013TodoAddIn.Forms { Properties.Settings.Default.NumDays = this.numRangeDays.Value; Properties.Settings.Default.MailAlertsEnabled = this.chkMailAlerts.Checked; + Properties.Settings.Default.DisplayTimeOut = (int)this.numRangeEmailAlertsTimeOut.Value * 1000; Properties.Settings.Default.ShowPastAppointments = this.chkShowPastAppointments.Checked; Properties.Settings.Default.Accounts = this.Accounts; Properties.Settings.Default.ShowFriendlyGroupHeaders = this.chkFriendlyGroupHeaders.Checked;