Exemplo n.º 1
0
 public ConvertNode(string name, ConvertNode parent)
 {
     this.Name   = name;
     this.Rank   = 0;
     this.Parent = parent;
     if (parent != null)
     {
         this.SchemeType = parent.SchemeType;
     }
 }
Exemplo n.º 2
0
 public static string CreateNameString(this ConvertNode node)
 {
     if (node.Parent != null)
     {
         return((node.Parent as ConvertNode).CreateNameString() + "." + node.Name);
     }
     else
     {
         return(string.Empty);
     }
 }
Exemplo n.º 3
0
 public void SetChildrenNodeType(ConvertNode root)
 {
     for (int i = 0; i < ChildrenNode.Count; i++)
     {
         ConvertNode tempNode = new ConvertNode(ChildrenNode[i]);
         tempNode.SchemeType = root.SchemeType;
         if (ChildrenNode[i] is JsonCNode)
         {
             tempNode.IsArray = (ChildrenNode[i] as JsonCNode).IsArray;
         }
         tempNode.Parent = this;
         tempNode.Root   = root;
         ChildrenNode[i] = tempNode;
         (ChildrenNode[i] as ConvertNode).SetChildrenNodeType(root);
     }
 }
 internal void SetSelectedNode(ConvertNode node)
 {
     SelectedNode = node;
 }
 internal void AddChildNode(ConvertNode node)
 {
     node.ChildrenNode.Add(new ConvertNode("NewNode", node));
 }