Esempio n. 1
0
        void BuildTree()
        {
            Nodes.Clear();

            if (ChartPage != null)
            {
                DocumentTreeNode nodeDoc = new DocumentTreeNode(ChartPage);
                nodeDoc.ImageIndex = nodeDoc.SelectedImageIndex = 0;
                Nodes.Add(nodeDoc);

                //========
                if (ChartPage is MindMap)
                {
                    var mindMap = (MindMap)ChartPage;
                    if (mindMap.Root != null)
                    {
                        TreeNode root = BuildTree(mindMap.Root, nodeDoc.Nodes);

                        root.Expand();
                    }
                }

                nodeDoc.Expand();
            }
        }
Esempio n. 2
0
        private void BuildTree()
        {
            InnerTreeView.Nodes.Clear();

            if (Map != null)
            {
                DocumentTreeNode nodeDoc = new DocumentTreeNode(Map);
                nodeDoc.ImageIndex = nodeDoc.SelectedImageIndex = 0;
                InnerTreeView.Nodes.Add(nodeDoc);

                if (Map.Root != null)
                {
                    TreeNode root = BuildTree(Map.Root, nodeDoc.Nodes);

                    root.Expand();
                }

                nodeDoc.Expand();
            }
        }