From 35a65fc9bb4fda234e1aedb4f3fc7983b0a86078 Mon Sep 17 00:00:00 2001 From: gamosoft_cp Date: Sat, 30 Mar 2013 00:35:37 +0000 Subject: [PATCH] Work in progress for better mail alerts --- Outlook2013TodoAddIn/Delete.png | Bin 0 -> 1491 bytes Outlook2013TodoAddIn/Envelope.png | Bin 0 -> 3432 bytes Outlook2013TodoAddIn/Flag.png | Bin 0 -> 3177 bytes Outlook2013TodoAddIn/NewMailAlert.Designer.cs | 146 ++++++++++++++++++ Outlook2013TodoAddIn/NewMailAlert.cs | 50 ++++++ Outlook2013TodoAddIn/NewMailAlert.resx | 120 ++++++++++++++ .../Outlook2013TodoAddIn.csproj | 18 +++ .../Properties/Resources.Designer.cs | 32 +++- .../Properties/Resources.resx | 9 ++ Outlook2013TodoAddIn/ThisAddIn.cs | 25 +++ 10 files changed, 399 insertions(+), 1 deletion(-) create mode 100644 Outlook2013TodoAddIn/Delete.png create mode 100644 Outlook2013TodoAddIn/Envelope.png create mode 100644 Outlook2013TodoAddIn/Flag.png create mode 100644 Outlook2013TodoAddIn/NewMailAlert.Designer.cs create mode 100644 Outlook2013TodoAddIn/NewMailAlert.cs create mode 100644 Outlook2013TodoAddIn/NewMailAlert.resx diff --git a/Outlook2013TodoAddIn/Delete.png b/Outlook2013TodoAddIn/Delete.png new file mode 100644 index 0000000000000000000000000000000000000000..d94c9e9c5bea21070466ee3be787bd923dbdd59a GIT binary patch literal 1491 zcmV;^1uXiBP)U8P*7-ZbZ>KLZ*U+lnSp_Ufq@}0xwybFAi#%#fq@|}KQEO56)-X|e7nZL z$iTqBa9P*U#mSX{G{Bl%P*lRez;J+pfx##xwK$o9f#C}S14DXwNkIt%17i#W1A|CX zc0maP17iUL1A|C*NRTrF17iyV0~1e4YDEbH0|SF|enDkXW_m`6f}y3QrGjHhep0GJ zaAk2xYHqQDXI^rCQ9*uDVo7QW0|Nup4h9AW240u^5(W3f%sd4n162kpgNVo|1qcff zJ_s=cNG>fZg9jx8g8+j9g8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tr3-B$f+)(0!9ffmm)ebu_1rM$>r4D_TO@I?DH?fVlHjtzAp tukBroo$cE!mARkOG0X4r{~wS)0{|34rm7W)-yHw|002ovPDHLkV1m|?nKu9c literal 0 HcmV?d00001 diff --git a/Outlook2013TodoAddIn/Envelope.png b/Outlook2013TodoAddIn/Envelope.png new file mode 100644 index 0000000000000000000000000000000000000000..e066b93704e6b3f5033d057b8c474a805384218b GIT binary patch literal 3432 zcmV-u4VUtXP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;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0I4oUVb6>FadjStXYFjP9Y|1(A+7U%34D1 zVLV3G1K*01tDHF6;vaR&s8dFrGU}93r;Ivf_&SAgbli5-DWguI000I6LymGQjU4te P00000NkvXXu0mjf*suSD literal 0 HcmV?d00001 diff --git a/Outlook2013TodoAddIn/NewMailAlert.Designer.cs b/Outlook2013TodoAddIn/NewMailAlert.Designer.cs new file mode 100644 index 0000000..9be16f2 --- /dev/null +++ b/Outlook2013TodoAddIn/NewMailAlert.Designer.cs @@ -0,0 +1,146 @@ +namespace Outlook2013TodoAddIn +{ + partial class NewMailAlert + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lblSender = new System.Windows.Forms.Label(); + this.lblSubject = new System.Windows.Forms.Label(); + this.txtBody = new System.Windows.Forms.TextBox(); + this.btnDelete = new System.Windows.Forms.Button(); + this.btnFlag = new System.Windows.Forms.Button(); + this.btnEnvelope = new System.Windows.Forms.Button(); + this.btnClose = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // lblSender + // + this.lblSender.AutoSize = true; + this.lblSender.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblSender.Location = new System.Drawing.Point(85, 11); + this.lblSender.Name = "lblSender"; + this.lblSender.Size = new System.Drawing.Size(52, 17); + this.lblSender.TabIndex = 0; + this.lblSender.Text = "label1"; + // + // lblSubject + // + this.lblSubject.AutoSize = true; + this.lblSubject.Location = new System.Drawing.Point(85, 28); + this.lblSubject.Name = "lblSubject"; + this.lblSubject.Size = new System.Drawing.Size(46, 17); + this.lblSubject.TabIndex = 1; + this.lblSubject.Text = "label1"; + // + // txtBody + // + this.txtBody.Location = new System.Drawing.Point(88, 49); + this.txtBody.Multiline = true; + this.txtBody.Name = "txtBody"; + this.txtBody.ReadOnly = true; + this.txtBody.Size = new System.Drawing.Size(214, 77); + this.txtBody.TabIndex = 2; + // + // btnDelete + // + this.btnDelete.BackgroundImage = global::Outlook2013TodoAddIn.Properties.Resources.Delete; + this.btnDelete.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnDelete.Location = new System.Drawing.Point(50, 94); + this.btnDelete.Name = "btnDelete"; + this.btnDelete.Size = new System.Drawing.Size(32, 32); + this.btnDelete.TabIndex = 6; + this.btnDelete.UseVisualStyleBackColor = true; + this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); + // + // btnFlag + // + this.btnFlag.BackgroundImage = global::Outlook2013TodoAddIn.Properties.Resources.Flag; + this.btnFlag.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnFlag.Location = new System.Drawing.Point(12, 94); + this.btnFlag.Name = "btnFlag"; + this.btnFlag.Size = new System.Drawing.Size(32, 32); + this.btnFlag.TabIndex = 5; + this.btnFlag.UseVisualStyleBackColor = true; + this.btnFlag.Click += new System.EventHandler(this.btnFlag_Click); + // + // btnEnvelope + // + this.btnEnvelope.BackgroundImage = global::Outlook2013TodoAddIn.Properties.Resources.Envelope; + this.btnEnvelope.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnEnvelope.Location = new System.Drawing.Point(16, 17); + this.btnEnvelope.Name = "btnEnvelope"; + this.btnEnvelope.Size = new System.Drawing.Size(60, 60); + this.btnEnvelope.TabIndex = 8; + this.btnEnvelope.UseVisualStyleBackColor = true; + this.btnEnvelope.Click += new System.EventHandler(this.btnEnvelope_Click); + // + // btnClose + // + this.btnClose.BackgroundImage = global::Outlook2013TodoAddIn.Properties.Resources.Delete; + this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnClose.Location = new System.Drawing.Point(282, 8); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(20, 20); + this.btnClose.TabIndex = 9; + this.btnClose.UseVisualStyleBackColor = true; + this.btnClose.Click += new System.EventHandler(this.btnClose_Click); + // + // NewMailAlert + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(314, 140); + this.Controls.Add(this.btnClose); + this.Controls.Add(this.btnEnvelope); + this.Controls.Add(this.btnDelete); + this.Controls.Add(this.btnFlag); + this.Controls.Add(this.txtBody); + this.Controls.Add(this.lblSubject); + this.Controls.Add(this.lblSender); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "NewMailAlert"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "NewMailAlert"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label lblSender; + private System.Windows.Forms.Label lblSubject; + private System.Windows.Forms.TextBox txtBody; + private System.Windows.Forms.Button btnFlag; + private System.Windows.Forms.Button btnDelete; + private System.Windows.Forms.Button btnEnvelope; + private System.Windows.Forms.Button btnClose; + } +} \ No newline at end of file diff --git a/Outlook2013TodoAddIn/NewMailAlert.cs b/Outlook2013TodoAddIn/NewMailAlert.cs new file mode 100644 index 0000000..e664393 --- /dev/null +++ b/Outlook2013TodoAddIn/NewMailAlert.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Outlook2013TodoAddIn +{ + public partial class NewMailAlert : Form + { + public Microsoft.Office.Interop.Outlook.MailItem Email { get; set; } + + public NewMailAlert(string sender, string subject, string body) + { + InitializeComponent(); + this.lblSender.Text = sender; + this.lblSubject.Text = subject; + this.txtBody.Text = body; + } + + private void btnDelete_Click(object sender, EventArgs e) + { + this.Email.Delete(); + this.Close(); + } + + private void btnFlag_Click(object sender, EventArgs e) + { + //Microsoft.Office.Interop.Outlook.OlFlagIcon.olYellowFlagIcon + this.Email.FlagRequest = "Follow up"; + this.Email.Save(); + this.Close(); + } + + private void btnEnvelope_Click(object sender, EventArgs e) + { + this.Email.Display(); + this.Close(); + } + + private void btnClose_Click(object sender, EventArgs e) + { + this.Close(); + } + } +} \ No newline at end of file diff --git a/Outlook2013TodoAddIn/NewMailAlert.resx b/Outlook2013TodoAddIn/NewMailAlert.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Outlook2013TodoAddIn/NewMailAlert.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Outlook2013TodoAddIn/Outlook2013TodoAddIn.csproj b/Outlook2013TodoAddIn/Outlook2013TodoAddIn.csproj index 1ecb855..bf4795d 100644 --- a/Outlook2013TodoAddIn/Outlook2013TodoAddIn.csproj +++ b/Outlook2013TodoAddIn/Outlook2013TodoAddIn.csproj @@ -185,6 +185,12 @@ FormRecurringOpen.cs + + Form + + + NewMailAlert.cs + Code @@ -203,6 +209,9 @@ FormRecurringOpen.cs + + NewMailAlert.cs + ResXFileCodeGenerator Resources.Designer.cs @@ -244,6 +253,15 @@ + + + + + + + + + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/Outlook2013TodoAddIn/Properties/Resources.Designer.cs b/Outlook2013TodoAddIn/Properties/Resources.Designer.cs index 4e6f799..96756e2 100644 --- a/Outlook2013TodoAddIn/Properties/Resources.Designer.cs +++ b/Outlook2013TodoAddIn/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18010 +// Runtime Version:4.0.30319.18033 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -60,6 +60,36 @@ namespace Outlook2013TodoAddIn.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Delete { + get { + object obj = ResourceManager.GetObject("Delete", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Envelope { + get { + object obj = ResourceManager.GetObject("Envelope", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Flag { + get { + object obj = ResourceManager.GetObject("Flag", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/Outlook2013TodoAddIn/Properties/Resources.resx b/Outlook2013TodoAddIn/Properties/Resources.resx index 6641111..286d282 100644 --- a/Outlook2013TodoAddIn/Properties/Resources.resx +++ b/Outlook2013TodoAddIn/Properties/Resources.resx @@ -118,6 +118,15 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Envelope.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Flag.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\2012-11-20_1546.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Outlook2013TodoAddIn/ThisAddIn.cs b/Outlook2013TodoAddIn/ThisAddIn.cs index 1f1e098..b123443 100644 --- a/Outlook2013TodoAddIn/ThisAddIn.cs +++ b/Outlook2013TodoAddIn/ThisAddIn.cs @@ -1,6 +1,7 @@ using Microsoft.Win32; using System; using System.Linq; +using System.Windows.Forms; using Office = Microsoft.Office.Core; namespace Outlook2013TodoAddIn @@ -33,6 +34,7 @@ namespace Outlook2013TodoAddIn /// EventArgs private void ThisAddIn_Startup(object sender, System.EventArgs e) { + Globals.ThisAddIn.Application.NewMailEx += Application_NewMailEx; this.AddRegistryNotification(); this.AppControl = new AppointmentsControl(); @@ -52,6 +54,29 @@ namespace Outlook2013TodoAddIn // TODO: Make sure there are no memory leaks (dispose COM objects) } + 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) + { + string sender = newMail.Sender.Name; + string subject = newMail.Subject; + string body = newMail.Body; + NewMailAlert nm = new NewMailAlert(sender, subject, body); + nm.Email = newMail; + nm.Top = 0; + nm.Left = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width - nm.Width; + // this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height; + nm.Show(); + if (nm.WindowState == FormWindowState.Minimized) + { + nm.WindowState = FormWindowState.Normal; + } + nm.Focus(); + nm.BringToFront(); + } + } + /// /// Store the new size setting upon resizing ///