private void GetNodesFlat(JQTreeNodeCollection nodes, JQTreeNodeCollection result) { foreach (JQTreeNode jQTreeNode in nodes) { result.Add(jQTreeNode); if (jQTreeNode.Nodes.Count > 0) { this.GetNodesFlat(jQTreeNode.Nodes, result); } } }
public JQTreeNodeCollection GetAllNodesFlat(JQTreeNodeCollection nodes) { JQTreeNodeCollection jQTreeNodeCollection = new JQTreeNodeCollection(); foreach (JQTreeNode jQTreeNode in nodes) { jQTreeNodeCollection.Add(jQTreeNode); if (jQTreeNode.Nodes.Count > 0) { this.GetNodesFlat(jQTreeNode.Nodes, jQTreeNodeCollection); } } return(jQTreeNodeCollection); }