public override TvNode MakeTree(TvNode TreeNode)
 {
     //var thisnode = new TreeViewItem() { Header = this.GetType().Name, Tag = this.GetType().Name, Visibility= Visibility.Collapsed };
     foreach (IOfferte of in Children)
     {
         of.MakeTree(TreeNode);
     }
     return(null);
 }
        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);
        }
Beispiel #3
0
        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);
        }