Example #1
0
		void _timer_Elapsed(object sender, ElapsedEventArgs e)
		{
			try
			{
				// Evil, but it prevents an OS Loader Lock.
				_timer.Stop();

				if (_outlookEventsManager == null)
				{
					_outlookEventsManager = new OutlookEventsManager(this.HostApplication as Outlook.Application);
				}
				_outlookEventsManager.ScanInbox();
			}
			catch (System.Exception ex)
			{
				Logger.LogError(ex);
			}
		}
Example #2
0
        private void AddinModule_AddinInitialize(object sender, EventArgs e)
        {
            try
            {
				if (_outlookEventsManager == null)
				{
					_outlookEventsManager = new OutlookEventsManager(this.HostApplication as Outlook.Application);
				}
            }
            catch (System.Exception ex)
            {
                Logger.LogError(ex);
            }
        }