/// <summary> /// 判断pNode及其子孙node,如为PageNode则Clone /// </summary> /// <param name="pNode"></param> private void CopyNode(ViewNode pNode) { if (null != pNode) { switch (pNode.Name) { case MyConst.View.KnxAppType: case MyConst.View.KnxAreaType: case MyConst.View.KnxRoomType: foreach (ViewNode cNode in pNode.Nodes) { CopyNode(cNode); } break; case MyConst.View.KnxPageType: PageNode pageNode = pNode as PageNode; if (null != pageNode) { //PageNode pageNodeClone = pNode.Tag as PageNode; //if (null != pageNodeClone) //{ // PageNode pageNodeCopy = pageNodeClone.Copy() as PageNode; // pNode.Text = pageNodeCopy.Text; // //pNode.Title = pageNodeCopy.Title; // pNode.Tag = pageNodeCopy; // pageNodeCopy.Tag = pNode; //} pageNode.CopyPageNode(); } break; default: break; } } }