private void InitWithCCNode(CCNode node, CCNode selectNode=null)
 {
     Reset();
     mBaseNode = node;
     mSelectNode = selectNode;
     mSelectTreeNode = null;
     mNodesTree.Nodes.Add(CreateTreeNode("base", node));
     mNodesTree.SelectedNode = mNodesTree.Nodes[0];
     if (mSelectTreeNode != null)
         mNodesTree.SelectedNode = mSelectTreeNode;
     
     mNodesTree.ExpandAll();
 }
 private CCTreeNode CreateTreeNode(string name, CCNode node)
 {
     List<CCTreeNode> children = new List<CCTreeNode>();
     if (node.children != null)
     {
         foreach (KeyValuePair<string, CCNode> kvp in node.children)
         {
             CCTreeNode treenode = CreateTreeNode(kvp.Key, kvp.Value);
             if (kvp.Value == mSelectNode)
             {
                 mSelectTreeNode = treenode;
             }
             children.Add(treenode);
         }
     }
     return new CCTreeNode(name, children.ToArray(), node);
 }
 public CCTreeNode(string name, CCTreeNode[] children, CCNode node)
     : base(name, children)
 {
     this.CCNode = node;
 }