/// <summary> /// 修改NODE显示的TEXT /// </summary> /// <param name="strNewText"></param> public virtual void ChangeNodeText(string strNewText) {//对节点重命名暂时仅支持页面片的重命名! TmpltBaseTreeNode tmpltBaseTreeNode = this; //找到对应的模板1 while (!(tmpltBaseTreeNode is TmpltElementNode)) { tmpltBaseTreeNode = (TmpltBaseTreeNode)tmpltBaseTreeNode.Parent; } TmpltSimpleExXmlElement tmpltElement = tmpltBaseTreeNode.Element as TmpltSimpleExXmlElement; //得到对应的模板文件DOC TmpltXmlDocument tmpltDocument = tmpltElement.GetIndexXmlDocument(); if (this is SnipElementNode) { SnipXmlElement snipElement = ((this as SnipElementNode).Element) as SnipXmlElement; snipElement.SnipName = strNewText; //通知页面设计器,更改FORM的TEXT string[] strArray = new string[2]; strArray[0] = snipElement.Id; strArray[1] = strNewText; SdsiteXmlDocument.OnSnipDesignerFormTextChange(new EventArgs <string[]>(strArray)); } }