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();
}
JSONObject::BuildTree ( |
private void LoadFile(string FileName) { JSONFile file = new JSONFile(FileName); rootObject = file.Open(); rootObject.NodeMenu = this.NodeMenu; rootObject.BuildTree(Tree); CurrentObject = rootObject; UpdateTabs(); settings.LastFilePath = FileDialog.FileName; this.Text = "JSONTools - " + settings.LastFilePath; hasChanged = false; }