public UserInterfaceContainer GetUIContainerForInspector(
            Outlook.Inspector inspector)
        {
            UserInterfaceContainer uiContainer = null;

            foreach (UserInterfaceContainer uic in _items)
            {
                if (uic.Inspector == inspector)
                {
                    uiContainer = uic;
                    break;
                }
            }
            return(uiContainer);
        }
        // Given a UserControl, return the matching UI container object.
        public UserInterfaceContainer GetUIContainerForUserControl(
            UserControl userControl)
        {
            UserInterfaceContainer uiContainer = null;

            foreach (UserInterfaceContainer uic in _items)
            {
                if (uic.TaskPane.ContentControl == userControl)
                {
                    uiContainer = uic;
                    break;
                }
            }
            return(uiContainer);
        }
        public bool AttachFormRegion(
            Outlook.Inspector inspector,
            IFormRegionControls formRegionControls)
        {
            bool updateOK = false;

            // Find this inspector in the our collection of containers.
            UserInterfaceContainer uiContainer =
                GetUIContainerForInspector(inspector);

            if (uiContainer != null)
            {
                uiContainer.FormRegionControls = formRegionControls;
                updateOK = true;
            }
            return(updateOK);
        }
Пример #4
0
        public bool AttachFormRegion(
            Outlook.Inspector inspector,
            IFormRegionControls formRegionControls)
        {
            bool updateOK = false;

            // 在容器的集合中查找此检查器。
            UserInterfaceContainer uiContainer =
                GetUIContainerForInspector(inspector);

            if (uiContainer != null)
            {
                uiContainer.FormRegionControls = formRegionControls;
                updateOK = true;
            }
            return(updateOK);
        }
Пример #5
0
 public void Add(UserInterfaceContainer uiContainer)
 {
     _items.Add(uiContainer);
     uiContainer.InspectorClose +=
         new EventHandler(uiContainer_InspectorClose);
 }
Пример #6
0
 public bool Remove(UserInterfaceContainer uiContainer)
 {
     return _items.Remove(uiContainer);
 }
 public bool Remove(UserInterfaceContainer uiContainer)
 {
     return(_items.Remove(uiContainer));
 }
 public void Add(UserInterfaceContainer uiContainer)
 {
     _items.Add(uiContainer);
     uiContainer.InspectorClose +=
         new EventHandler(uiContainer_InspectorClose);
 }