Ejemplo n.º 1
0
 // Adds base nodes (those with a parent id of 0).
 private void AddNodes(Cluster c)
 {
     List<long> nodeList = c.GetChildNodes(0);
      foreach (long id in nodeList)
      {
     TreeNode node = new TreeNode(c.GetTitle(id));
     node.Tag = id;
     nodeTree.Nodes.Add(node);
     AddNodes(c, node);
      }
 }
Ejemplo n.º 2
0
 // Adds nodes for children of the given parent.
 private void AddNodes(Cluster c, TreeNode parent)
 {
     long parent_id = (long)parent.Tag;
      List<long> nodeList = c.GetChildNodes(parent_id);
      foreach (long id in nodeList)
      {
     TreeNode node = new TreeNode(c.GetTitle(id));
     node.Tag = id;
     parent.Nodes.Add(node);
     AddNodes(c, node);
      }
 }