TreeModel BuildTreeModel()
        {
            TreeStore treeStore = new TreeStore(typeof(ComponentsLibraryNode));

            foreach (ComponentsLibraryNode node in NodesTreeBuilder.Build(viewModel))
            {
                TreeIter treeParentNode = treeStore.AppendValues(node);
                //foreach (ComponentsLibraryNode nodeChild in node)
                //    AddNodeToTreeModel(nodeChild, treeStore, treeParentNode);
                // HERZUM SPRINT 3: TLAB-194
                List <ComponentsLibraryNode> listNode = new List <ComponentsLibraryNode> ();
                foreach (ComponentsLibraryNode nodeChild in node)
                {
                    listNode.Add(nodeChild);
                }
                listNode.Sort();
                if (listNode.Count > 0)
                {
                    foreach (ComponentsLibraryNode nodeChild in listNode)
                    {
                        AddNodeToTreeModel(nodeChild, treeStore, treeParentNode);
                    }
                }
                // END HERZUM SPRINT 3: TLAB-194
            }

            return(treeStore);
        }
Beispiel #2
0
        TreeModel BuildTreeModel()
        {
            TreeStore treeStore = new TreeStore(typeof(ComponentsLibraryNode));

            foreach (ComponentsLibraryNode node in NodesTreeBuilder.Build(viewModel))
            {
                TreeIter treeParentNode = treeStore.AppendValues(node);
                foreach (ComponentsLibraryNode nodeChild in node)
                {
                    AddNodeToTreeModel(nodeChild, treeStore, treeParentNode);
                }
            }

            return(treeStore);
        }