public void Startup(IAgileOutlookAddIn baseAddin,IMailHandler mailHandler) { foreach (var tagger in Taggers) { tagger.Startup(baseAddin, this); } mailHandler.MailReceived += new MailEvent(Mail_Received); mailHandler.MailSent += new MailEvent(Mail_Sent); }
public void Startup(IAgileOutlookAddIn baseAddin) { Log.Debug("mail handler startup."); BaseAddIn = baseAddin; Plugins.ToList().ForEach(m => m.Startup(baseAddin,this)); syncItems.ItemSync += SyncItems_ItemSync; if (!File.Exists(syncItems.FileName)) { Microsoft.Office.Tools.Outlook.OutlookAddInBase a; syncItems.InitializeSyncTimesAccounts(DateTime.Now, this); syncItems.Save(); } else { syncItems.Load(); } BaseAddIn.OutlookApp.NewMailEx += new Outlook.ApplicationEvents_11_NewMailExEventHandler(OutlookApp_NewMailEx); //baseAddin.OutlookApp.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler(OutlookApp_ItemSend); HookupSentMail(); mailCheckTimer.Enabled = true; mailCheckTimer.Start(); }