欢迎来到天天文库
浏览记录
ID:42211173
大小:1.11 MB
页数:128页
时间:2019-09-10
《聚光能源在线监测系统软件v1.0_代码》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、usingSystem;usingSystem.Collections;usingSystem」O;usingSystem.Reflection;usingSystem.Text;usingSystem.Xml;usingFpi.Util.Sundry;usingSystem.Globalization;usingFpi.lltil.Reflection;usingFpi.Util.Security;usingSystem.Resources;usingSystem.Threading;usingFpi.PlatformCE;namespaceFpi.Xml{III<
2、summary>IIIBaseNode的摘要说明。///Xml节点的基础类III//[Serializable]publicclassBaseNode:IParentNod巳ICIoneable{publicNodeListpropertys;〃该对象用來防止命名空间偶尔错乱的BUG〃改为静态变量privatestaticobjectsyncObj=newobject();〃增加Xml加密算法addbyyjy,2010.04.24//protectedIXmlEncryptxmlEncrypt=AesCryptHelper.Getlnstance(
3、);〃节点在xml文档中的名称protectedstringnodeName;protectedstringdefaultFileName;protectedBaseNode(){nodeName=GetType().Name;nodeName=nodeName.ToLower()[0]+nodeName.Substring(l);defaultFileName=ConstConfig.XmlPath+GetType().Name+H.xm}publicvirtualBaseNodeInit(XmlNodenode){this,nodeName=node.Name;f
4、oreach(XmlNodexninnode.ChildNodes)〃遍历所有子节点ParseXmlNode(xn.Name,xn);returnthis;publicstringGetPropertyValue(stringid,stringdefaultvalue){Propertyprop=GetProperty(id);if(prop!=null){returnprop.value;}returndefaultvalue;}publicstringGetPropertyValue(stringid){Propertyprop=GetProperty(id);讦
5、(prop!=null){returnprop.value;}returnnull;}publicPropertyGetProperty(stringid){if(propertys==null){returnnull;}Propertyprop=(Property)propertys[id];returnprop;}publicvoidAddProperty(strjngpropertyld){Propertyprop=newProperty(propertyld,propertyld);AddProperty(prop);}publicvoidAddPropert
6、y(Propertyprop){if(propertys==null){propertys=newNodeList();}propertys.Add(prop);}publicvoidSetPropertyfstringid,stringvalue)if(propertys==null){propertys=newNodeList();}Propertyprop=(Property)propertys[id];if(prop==null){prop=newPropertyO;prop.id=id;prop.name=id;propertys.Add(prop);}pr
7、op.value=value;}publicvoidSetProperty(stringid,stringname,stringvalue){if(propertys==null){propertys=newNodeList();}Propertyprop=(Property)propertys[id];if(prop==null){prop=newProperty(id,name);propertys.Add(prop);}prop.value=value;}publicvoidRemoveProperty(stringid){if(propert
此文档下载收益归作者所有