示例#1
0
 public override string GetTreeLabel()
 {
     if (target == null)
     {
         return("<ref not loaded>");
     }
     return(target.GetTreeLabel());
 }
示例#2
0
        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"));
                }
            }
        }