示例#1
0
        void LoadDocs()
        {
            this.Form.TreeView.Nodes.Clear();

            if (this.Unit != null)
            {
                TreeNode root = this.Form.TreeView.Nodes.Add(this.Unit.Name);

                foreach (Entity entity in this.Unit.Classes)
                {
                    var subNode = new DocTreeNode(entity);

                    root.Nodes.Add(subNode);
                    this.LoadEntity(subNode, entity);
                }

                root.Expand();
            }
            else
            {
                MessageBox.Show("No docs loaded.");
            }

            return;
        }
示例#2
0
        void LoadEntity(TreeNode node, Entity entity)
        {
            foreach (Entity subEntity in entity.Entries)
            {
                var subNode = new DocTreeNode(subEntity);

                node.Nodes.Add(subNode);

                this.LoadEntity(subNode, subEntity);
            }

            return;
        }