コード例 #1
0
        protected static void AddRunningObjs()
        {
            TraceUtil.WriteLineInfo(null, "AddRunningObjs");
            ObjectTreeNode tlNode = null;

            // Running objects - added to object tree
            if (_runningObjInfo == null)
            {
                _runningObjInfo            = ObjectInfoFactory.GetObjectInfo(false, new ArrayList());
                _runningObjInfo.ObjectName = StringParser.Parse("${res:ComponentInspector.ComRunningObjectsTreeNode.Text}");
                tlNode = new ObjectTreeNode(true, _runningObjInfo);
                // The children are explicitly added here
                tlNode.ChildrenAlreadyAdded = true;
                tlNode.NodeOrder            = 20;
                tlNode.AllowDelete          = false;
                tlNode.IsDropTarget         = false;
                ObjectBrowser.ObjTree.CreateControl();
                ObjectBrowser.ObjTree.Invoke(new BrowserTree.AddNodeInvoker(ObjectBrowser.ObjTree.AddNode),
                                             new Object[] { tlNode });
            }
            else
            {
                tlNode = ObjectTreeNode.FindObject(_runningObjInfo.Obj, !ObjectTreeNode.CREATE_OBJ);
                ((ArrayList)_runningObjInfo.Obj).Clear();
                tlNode.InvalidateNode();
            }
            ProgressDialog progress = new ProgressDialog();

            progress.Setup(StringParser.Parse("${res:ComponentInspector.ProgressDialog.AddingRunningComObjectsDialogTitle}"),
                           StringParser.Parse("${res:ComponentInspector.ProgressDialog.AddingRunningComObjectsMessage}"),
                           ComObjectInfo.GetRunningObjectCount(),
                           ProgressDialog.HAS_PROGRESS_TEXT,
                           ProgressDialog.FINAL);
            progress.ShowIfNotDone();
            foreach (ComObjectInfo comObjInfo in ComObjectInfo.GetRunningObjects(progress))
            {
                ObjectBrowser.ObjTree.Invoke(new ObjectTreeNode.AddObjectInvoker(tlNode.AddObject),
                                             new Object[] { comObjInfo });
            }
            tlNode.Expand();
            progress.Finished();
        }
コード例 #2
0
        public override void GetDetailText()
        {
            base.GetDetailText();

            ObjectInfo.GetDesc(_type, _typeKindName);

            String baseIfType;

            if (_type.IsInterface)
            {
                baseIfType = "Inherited Interface";
            }
            else
            {
                baseIfType = "Implemented Interface";
            }

            foreach (Type intf in _type.GetInterfaces())
            {
                DetailPanel.AddLink(baseIfType,
                                    !ObjectBrowser.INTERNAL,
                                    60,
                                    TypeLinkHelper.TLHelper,
                                    intf);
            }

            if (_type.BaseType != null)
            {
                DetailPanel.AddLink("Base Type",
                                    !ObjectBrowser.INTERNAL,
                                    51,
                                    TypeLinkHelper.TLHelper,
                                    _type.BaseType);
            }

            ComObjectInfo.GetDetailAxType(_type, null, null, 0);
        }