public override string GetTreeLabel() { if (target == null) { return("<ref not loaded>"); } return(target.GetTreeLabel()); }
public override void AddChildsToTree(ItemCollection items) { JsonArray nodes = this["_nodes"] as JsonArray; foreach (AElement it in nodes) { AElement key = (it as JsonObject)["key"]; AElement val = (it as JsonObject)["val"]; if (key.Type == JTokenType.String || key.Type == JTokenType.Null) { items.Add(val.ToTreeItem(key.GetTreeLabel())); } else { items.Add(key.ToTreeItem("key")); items.Add(val.ToTreeItem("val")); } } }