public ConvertNode(string name, ConvertNode parent)
 {
     this.Name   = name;
     this.Rank   = 0;
     this.Parent = parent;
     if (parent != null)
     {
         this.SchemeType = parent.SchemeType;
     }
 }
Example #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);
     }
 }
 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));
 }