Example #1
0
 public void Tree()
 {
     Header = node.GetNodeName();
     Name   = node.GetNodeName();
     Tag    = node.CloneWithoutChildren();
     foreach (NodeEntity item in node.GetChildren())
     {
         Tree(this, item);
     }
 }
Example #2
0
        private void Tree(XMLNode arg1, NodeEntity arg2)
        {
            XMLNode add = new XMLNode();

            add.Header = arg2.GetNodeName();
            add.Name   = arg2.GetNodeName();
            add.Tag    = arg2.CloneWithoutChildren();
            foreach (NodeEntity item in arg2.GetChildren())
            {
                Tree(add, item);
            }
            arg1.Items.Add(add);
        }
Example #3
0
 private void AddBinding(NodeEntity arg)
 {
     if (@"Binding".Equals(arg.GetNodeName()))
     {
         Keys    addKey = StringToKey(arg.Find(@"BindFrom").Find(@"Key").GetNodeValue());
         bool    isUp   = bool.Parse(arg.Find(@"BindFrom").Find(@"IsUp").GetNodeValue());
         Binding add    = new Binding(addKey, isUp);
         arg.Find(@"BindTo").GetChildren().ForEach(item => {
             Keys childKey  = StringToKey(item.Find(@"Key").GetNodeValue());
             bool childIsUp = bool.Parse(item.Find(@"IsUp").GetNodeValue());
             add.Add(childKey, childIsUp);
         });
         b.Add(add);
     }
 }