private void GetDesignsFromSubsectionNode(SubsectionNode node, ref ArrayList designs) { foreach (DesignNode subNode in node.Nodes) { designs.Add(subNode.Design); } }
private int FindSubsection(string subsection) { for (int i = 0; i < this.Nodes.Count; ++i) { SubsectionNode node = (SubsectionNode)this.Nodes[i]; if (node.Text.ToLower() == subsection) { return(i); } } return(-1); }
public void AddDesign(DesignData design) { int index = FindSubsection(design.Subsection.ToLower()); SubsectionNode subsection = null; if (index != -1) { subsection = (SubsectionNode)this.Nodes[index]; } else { subsection = new SubsectionNode(design.Subsection); this.Nodes.Add(subsection); } subsection.Nodes.Add(new DesignNode(design)); }