示例#1
0
 void FillNode([NotNull] TreeNode node)
 {
     if (!extendsToClasses.ContainsKey(node.Name))
     {
         return;
     }
     foreach (var aClass in extendsToClasses[node.Name])
     {
         var extends = aClass.InFile.Context.ResolveType(aClass.ExtendsType, aClass.InFile);
         if (extends.Type != node.Text)
         {
             continue;
         }
         var      icon  = PluginUI.GetIcon(aClass.Flags, aClass.Access);
         TreeNode child = new ClassHierarchyNode(aClass, icon, icon);
         node.Nodes.Add(child);
         typeToNode[aClass.Type] = child;
         FillNode(child);
     }
 }
示例#2
0
        void FillTree()
        {
            typeToNode.Clear();
            if (curClass.IsVoid())
            {
                return;
            }
            TreeNode parent = null;
            int      icon;

            foreach (var aClass in GetExtends(curClass))
            {
                icon = PluginUI.GetIcon(aClass.Flags, aClass.Access);
                TreeNode child = new ClassHierarchyNode(aClass, icon, icon);
                if (parent == null)
                {
                    tree.Nodes.Add(child);
                }
                else
                {
                    parent.Nodes.Add(child);
                }
                typeToNode[aClass.Type] = child;
                parent = child;
            }
            icon = PluginUI.GetIcon(curClass.Flags, curClass.Access);
            TreeNode node = new ClassHierarchyNode(curClass, icon, icon);

            node.NodeFont = new Font(tree.Font, FontStyle.Underline);
            if (parent == null)
            {
                tree.Nodes.Add(node);
            }
            else
            {
                parent.Nodes.Add(node);
            }
            tree.SelectedNode         = node;
            typeToNode[curClass.Type] = node;
            FillNode(node);
        }