/// <summary>
        /// Wraps an Inspector if required and remember it in memory to get events of the wrapped Inspector
        /// </summary>
        /// <param name="inspector">The Outlook Inspector instance</param>
        void WrapInspector(Outlook.Inspector inspector)
        {
            InspectorWrapper wrapper = InspectorWrapper.GetWrapperFor(inspector);

            if (wrapper != null)
            {
                // register for the closed event
                wrapper.Closed += new InspectorWrapperClosedEventHandler(wrapper_Closed);
                // remember the inspector in memory
                _wrappedInspectors[wrapper.Id] = wrapper;
            }
        }
예제 #2
0
 /// <summary>
 /// Wraps an Inspector if required and remember it in memory to get events of the wrapped Inspector
 /// </summary>
 /// <param name="inspector">The Outlook Inspector instance</param>
 void WrapInspector(Outlook.Inspector inspector)
 {
     try
     {
         InspectorWrapper wrapper = InspectorWrapper.GetWrapperFor(inspector);
         if (wrapper != null)
         {
             // register for the closed event
             wrapper.Closed += new InspectorWrapperClosedEventHandler(wrapper_Closed);
             // remember the inspector in memory
             _wrappedInspectors[wrapper.Id] = wrapper;
         }
     }
     catch (Exception er) { MessageBox.Show(er.ToString()); }
 }