void SetTabPanels()
        {
            _tabControl.Controls.Clear();

            // Set up the tabs in the right order
            if (_objTreeTabPage != null)
            {
                _tabControl.Controls.Add(_objTreeTabPage);
            }
            if (ComSupport.ComTabPage != null)
            {
                _tabControl.Controls.Add(ComSupport.ComTabPage);
            }
            if (ComponentInspectorProperties.ShowAssemblyPanel)
            {
                _tabControl.Controls.Add(AssemblySupport.AssyTabPage);
            }
            if (ComponentInspectorProperties.ShowControlPanel)
            {
                // Make sure the tree is up to date
                ControlTree.SetupControlTree();
                _tabControl.Controls.Add(AssemblySupport.ControlTabPage);
            }

            if (ComponentInspectorProperties.ShowGacPanel)
            {
                _tabControl.Controls.Add(_gacTabPage);
            }
            _tabControl.Controls.Add(_eventLog.EventLogTabPage);
            _tabControl.Controls.Add(_eventLog.EventsBeingLoggedTabPage);
        }
Exemple #2
0
 internal static void Init()
 {
     _assyTree = new BrowserTree();
     SetupTree(_assyTree);
     _assyRootNode      = new BrowserTreeNode();
     _assyRootNode.Text = StringParser.Parse("${res:ComponentInspector.AssemblyTreeNode.Text}");
     _assyRootNode.ChildrenAlreadyAdded = true;
     _assyRootNode.SetPresInfo(PresentationMap.FOLDER_CLOSED);
     _assyTree.AddNode(_assyRootNode);
     _assyTabPage = new TabPage();
     _assyTabPage.Controls.Add(_assyTree);
     _assyTabPage.Text        = StringParser.Parse("${res:ComponentInspector.FindDialog.AssembliesRadioButton}");
     _assyTabPage.BorderStyle = BorderStyle.None;
     _controlTree             = new ControlTree();
     SetupTree(_controlTree);
     _controlTabPage = new TabPage();
     _controlTabPage.Controls.Add(_controlTree);
     _controlTabPage.Text        = StringParser.Parse("${res:ComponentInspector.ControlsTab}");
     _controlTabPage.BorderStyle = BorderStyle.None;
     _assemblies = ComponentInspectorProperties.PreviouslyOpenedAssemblies;
 }
Exemple #3
0
        internal static AssemblyTreeNode AddAssy(Assembly assy, TypeLibrary typeLib)
        {
            // The assembly might have already been added (this can
            // happen when a previously converted [from com] assembly
            // is opened), if so,
            // find it and make sure the typeLib information is provided
            AssemblyTreeNode atNode = FindAssemblyNode(assy);

            if (atNode != null)
            {
                if (typeLib != null)
                {
                    atNode.TypeLib = typeLib;
                }
                return(atNode);
            }
            ICollection types = null;

            // Only get the types if the control tree is showing because
            // it can take a long time
            if (ComponentInspectorProperties.ShowControlPanel)
            {
                types = GetAssyTypes(assy);
            }
            AssemblyTreeNode node = new AssemblyTreeNode(assy, typeLib);

            if (_assyTree.InvokeRequired)
            {
                _assyTree.Invoke(new BrowserTreeNode.AddLogicalInvoker(_assyRootNode.AddLogicalNode),
                                 new Object[] { node });
                _controlTree.Invoke(new ControlTree.AddAssyInvoker(ControlTree.AddAssy),
                                    new Object[] { assy, types });
            }
            else
            {
                _assyRootNode.AddLogicalNode(node);
                ControlTree.AddAssy(assy, types);
            }
            return(node);
        }
Exemple #4
0
 internal ControlTree()
 {
     _controlTree = this;
 }
 internal ControlTree()
 {
     _controlTree = this;
 }
		internal static void Init()
		{
			_assyTree = new BrowserTree();
			SetupTree(_assyTree);
			_assyRootNode = new BrowserTreeNode();
			_assyRootNode.Text = StringParser.Parse("${res:ComponentInspector.AssemblyTreeNode.Text}");
			_assyRootNode.ChildrenAlreadyAdded = true;
			_assyRootNode.SetPresInfo(PresentationMap.FOLDER_CLOSED);
			_assyTree.AddNode(_assyRootNode);
			_assyTabPage = new TabPage();
			_assyTabPage.Controls.Add(_assyTree);
			_assyTabPage.Text = StringParser.Parse("${res:ComponentInspector.FindDialog.AssembliesRadioButton}");
			_assyTabPage.BorderStyle = BorderStyle.None;
			_controlTree = new ControlTree();
			SetupTree(_controlTree);
			_controlTabPage = new TabPage();
			_controlTabPage.Controls.Add(_controlTree);
			_controlTabPage.Text = StringParser.Parse("${res:ComponentInspector.ControlsTab}");
			_controlTabPage.BorderStyle = BorderStyle.None;
			_assemblies = ComponentInspectorProperties.PreviouslyOpenedAssemblies;
		}