コード例 #1
0
 private void GetDesignsFromSubsectionNode(SubsectionNode node, ref ArrayList designs)
 {
     foreach (DesignNode subNode in node.Nodes)
     {
         designs.Add(subNode.Design);
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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));
        }