XCore.SidebarAdapter.FillTreeNodes C# (CSharp) Method

FillTreeNodes() protected method

the first time this is called, the group will be the band. It will then be called recursively for each note that contains other nodes.
protected FillTreeNodes ( TreeNodeCollection nodes, XCore.ChoiceGroup group ) : void
nodes System.Windows.Forms.TreeNodeCollection
group XCore.ChoiceGroup
return void
		protected void FillTreeNodes (TreeNodeCollection nodes, ChoiceGroup group)
		{
			if (nodes.Count >0)//hack...without this, we were losing expansion during OnIdle()
				return;
			nodes.Clear();
			group.PopulateNow();
			foreach(ChoiceRelatedClass item in group)
			{
				TreeNode node =MakeTreeNode(item);
				nodes.Add(node);
				if (item is ChoiceGroup)
					FillTreeNodes (node.Nodes, (ChoiceGroup) item);
			}
		}