Example #1
0
        /// <summary>
        /// The NewInspector event fires whenever a new Inspector is displayed.
        /// </summary>
        /// <param name="Explorer"></param>
        void m_Inspectors_NewInspector(Microsoft.Office.Interop.Outlook.Inspector Inspector)
        {
            m_Ribbon.Invalidate();

            try
            {
                // Check to see if this is a new window
                // we don't already track
                OutlookInspector existingWindow = FindOutlookInspector(Inspector);
                // If the m_InspectorWindows collection does not
                // have a window for this Inspector,
                // we should add it to m_InspectorWindows
                if (existingWindow == null)
                {
                    OutlookInspector window = new OutlookInspector(Inspector);
                    window.Close             += new EventHandler(WrappedInspectorWindow_Close);
                    window.InvalidateControl += new EventHandler <OutlookInspector.InvalidateEventArgs>(WrappedInspectorWindow_InvalidateControl);
                    m_InspectorWindows.Add(window);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }
        }
Example #2
0
 void WrappedInspectorWindow_InvalidateControl(object sender, OutlookInspector.InvalidateEventArgs e)
 {
     if (m_Ribbon != null)
     {
         m_Ribbon.InvalidateControl(e.ControlID);
     }
 }
Example #3
0
        /// <summary>
        /// The NewInspector event fires whenever a new Inspector is displayed. 
        /// </summary>
        /// <param name="Explorer"></param>
        void m_Inspectors_NewInspector(Microsoft.Office.Interop.Outlook.Inspector Inspector)
        {
            m_Ribbon.Invalidate();

            try
            {
                // Check to see if this is a new window 
                // we don't already track
                OutlookInspector existingWindow = FindOutlookInspector(Inspector);
                // If the m_InspectorWindows collection does not 
                // have a window for this Inspector,
                // we should add it to m_InspectorWindows
                if (existingWindow == null)
                {
                    OutlookInspector window = new OutlookInspector(Inspector);
                    window.Close += new EventHandler(WrappedInspectorWindow_Close);
                    window.InvalidateControl += new EventHandler<OutlookInspector.InvalidateEventArgs>(WrappedInspectorWindow_InvalidateControl);
                    m_InspectorWindows.Add(window);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }
        }