/* * Fill the event's target tree node's children with their children * (to show the [+] if they contain child nodes). */ public void FillNode(object sender, TreeViewCancelEventArgs args) { foreach (TreeNode child in args.Node.Nodes) { EsfTreeNode esfNode = child as EsfTreeNode; if (esfNode != null) { esfNode.Fill(); } } }
public void Fill() { if (base.Nodes.Count == 0) { ParentNode parentNode = base.Tag as ParentNode; foreach (ParentNode child in parentNode.Children) { EsfTreeNode node = new EsfTreeNode(child, ShowCode); base.Nodes.Add(node); } } }
public void Fill() { if (Nodes.Count == 0) { #if DEBUG Console.WriteLine("filling list for {0}", (Tag as ParentNode).Name); #endif ParentNode parentNode = (Tag as ParentNode); foreach (ParentNode child in parentNode.Children) { EsfTreeNode childNode = new EsfTreeNode(child, ShowCode); Nodes.Add(childNode); } } }