public virtual void OnSubNodeCreated(TreeNodeX parentNode, TreeNodeX subNode) { if (NextLevelLoaded) { if (this != parentNode) { if (this.TreeNodeId == parentNode.TreeNodeId) { TreeNode tn = subNode.CreatePointer(); this.Nodes.Add(tn); } else { for (int i = 0; i < Nodes.Count; i++) { TreeNodeX tnx = Nodes[i] as TreeNodeX; if (tnx != null) { tnx.OnSubNodeCreated(parentNode, subNode); } } } } } }
public override void OnSubNodeCreated(TreeNodeX parentNode, TreeNodeX subNode) { if (this.TreeNodeId == parentNode.TreeNodeId) { TreeNode tnx = subNode.CreatePointer(); this.Nodes.Add(tnx); } else { base.OnSubNodeCreated(parentNode, subNode); } }