public virtual TvNode MakeTree(TvNode TreeCollection) { List <TvNode> Childs = new List <TvNode>(); foreach (IOfferte of in Children) { Childs.Add(of.MakeTree(null)); } var thisnode = new TvNode(this.GetType().Name, "ID" + Acumulator.GetNodeID(), this.GetType().Name, Childs, TreeCollection); return(thisnode); }
public override TvNode MakeTree(TvNode TreeNode) { List <TvNode> Childs = new List <TvNode>(); foreach (IOfferte of in Children) { Childs.Add(of.MakeTree(TreeNode)); } Childs.Add(new TvNode("Tot slot", "ID" + Acumulator.GetNodeID(), "FinalStage", null, null)); //TreeNode.Children.AddRange(Childs); Acumulator.Instance().BB.treeView1.ItemsSource = Childs; return(null); }
public override TvNode MakeTree(TvNode TreeNode) { List <TvNode> Childs = new List <TvNode>(); var bnr = ""; if (Acumulator.Instance().Bouwnr != null) { bnr = (from b in Acumulator.Instance().ctx.Bouwnummers where b.B_ID == Acumulator.Instance().Bouwnr select b.Omschrijving).FirstOrDefault(); } var thisnode = new TvNode("Overzicht: " + bnr, "ID" + Acumulator.GetNodeID(), this.GetType().Name, Childs, TreeNode); foreach (IOfferte of in Children) { Childs.Add(of.MakeTree(thisnode)); } thisnode.Children = Childs; return(thisnode); }