using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WindowsFormsApp4
{
public class TreeNode
{
public TN Data { get; set; }
public TreeNode
public ICollection
public string name;
public TreeNode(TN data, string N)
{
this.Parent = null;
this.Data = data;
this.Children = new LinkedList
this.name = N;
}
public TreeNode
{
TreeNode
this.Children.Add(childNode);
return childNode;
}
public TreeNode
{
TreeNode
if (name == N) return this;
for (int i = 0; i < Children.Count(); i++)
{
if (Children.ElementAt(i).name == N)
{
tmp = Children.ElementAt(i);
break;
}
else
{
tmp = Children.ElementAt(i).find_Node(N);
if (tmp != null) break;
}
}
return tmp;
}
public Collection
{
//Collection
if (name == N)
{
tnin.Add(this);
test = true;
return tnin;
}
for (int i = 0; i < Children.Count(); i++)
{
bool tmptest = false;
Collection
if (tmptest == true)
{
tnin = hhh;
tnin.Add(this);
test = true;
return tnin;
}
}
test = false;
return tnin;
}
}
}