public void BuildTree()
{
if (this.TreeNode == null) { return; }
this.TreeNode.Nodes.Clear();
if (NodeMenu != null) { this.TreeNode.ContextMenuStrip = NodeMenu; }
foreach (JSONObject child in this.ChildJSONObjects)
{
if (string.IsNullOrEmpty(child.Name))
{
child.Name = this.TreeNode.Nodes.Count.ToString();
child.TreeNode.Text = child.Name;
}
child.NodeMenu = this.NodeMenu;
this.TreeNode.Nodes.Add(child.TreeNode);
child.BuildTree();
}
this.SetImage();
}