/// <summary>
        /// 应用程序的主入口点。
        /// </summary>

        static void Test()
        {
            Type type = typeof(CCMenuItemSprite);
            ConstructorInfo info = type.GetConstructor(new Type[] { });

            CCNode node = new CCNode();
            node.position = new CCPoint();

            CCNodeRGBA node1 = new CCNodeRGBA();
            node1.opacity = 1;

            node.addChild("123", node1);

            List<Type> knowtypes = new List<Type>();
            foreach (Type t in Assembly.GetExecutingAssembly().GetTypes())
            {
                if (t.Namespace == "UiEditor.UI")
                {
                    knowtypes.Add(t);
                }

            }
            /*
            JsonSerializerSettings setting = new JsonSerializerSettings();
            //setting.ObjectCreationHandling = ObjectCreationHandling.;
            setting.TypeNameHandling = TypeNameHandling.Auto;
            setting.TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple;
            
            string json = JsonConvert.SerializeObject(node, Formatting.Indented, setting);
            //Console.Write(node.ToJson());
            Console.Write(json);

            //JsonConvert.DeserializeObject(json, typeof(CCNode));
            CCNode node2 = JsonConvert.DeserializeObject<CCNode>(json, setting);*/

            string json = node.ToJson();
            Console.Write(json);

            CCNode node3 = CCNode.FromJson<CCNode>(json);
            

            /*DataContractJsonSerializer json = new DataContractJsonSerializer(node.GetType(), knowtypes);
            MemoryStream stream = new MemoryStream();

            json.WriteObject(stream, node);
            string jsonsz = Encoding.UTF8.GetString(stream.ToArray());
            Console.Write(jsonsz);*/
        }
        private void OnPastClick(object sender, EventArgs e)
        {
            CCTreeNode tSelNode = (CCTreeNode)mNodesTree.SelectedNode;
            if (tSelNode == null)
                return;
            if (mCopyNode == null)
                return;

            string name = GetInput();
            if (name == null)
            {
                return;
            }

            tSelNode.CCNode.addChild(name, mCopyNode);

            mBaseNode = CCNode.FromJson<CCNode>(mBaseNode.ToJson());
            mBaseNode = CCNode.FromJson<CCNode>(mBaseNode.ToJson());
            InitWithCCNode(mBaseNode);
        }