根据XML配置文件自动生成窗体控件

上传者: binrongsdxc | 上传时间: 2021-07-02 22:58:12 | 文件大小: 2.71MB | 文件类型: RAR
最近在做数据采集,采集内容总是变来变去,于是考虑通过XML配置,采用反射原理动态加载窗体控件,采集内容也随之变成动态的

文件下载

资源详情

[{"title":"( 45 个子文件 2.71MB ) 根据XML配置文件自动生成窗体控件","children":[{"title":"CreateFormfromXML.suo <span style='color:#111;'> 35.00KB </span>","children":null,"spread":false},{"title":"XmlConfigRead","children":[{"title":"XmlForm.cs <span style='color:#111;'> 2.81KB </span>","children":null,"spread":false},{"title":"Form1.cs <span style='color:#111;'> 1.65KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Debug","children":[{"title":"XmlConfigRead.vshost.exe <span style='color:#111;'> 13.99KB </span>","children":null,"spread":false},{"title":"XmlConfigRead.pdb <span style='color:#111;'> 29.50KB </span>","children":null,"spread":false},{"title":"System.Windows.Forms.dll <span style='color:#111;'> 4.79MB </span>","children":null,"spread":false},{"title":"XmlConfigRead.exe <span style='color:#111;'> 10.50KB </span>","children":null,"spread":false},{"title":"XmlConfigRead.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"obj","children":[{"title":"Debug","children":[{"title":"XmlConfigRead.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"XmlConfigRead.pdb <span style='color:#111;'> 29.50KB </span>","children":null,"spread":false},{"title":"XmlConfigRead.exe <span style='color:#111;'> 10.50KB </span>","children":null,"spread":false},{"title":"XmlConfigRead.csproj.FileListAbsolute.txt <span style='color:#111;'> 918B </span>","children":null,"spread":false},{"title":"XmlConfigRead.csproj.GenerateResource.Cache <span style='color:#111;'> 847B </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"XmlConfigRead.Form1.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Properties","children":[{"title":"Resources.Designer.cs <span style='color:#111;'> 2.81KB </span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false}],"spread":true},{"title":"Program.cs <span style='color:#111;'> 474B </span>","children":null,"spread":false},{"title":"Form1.Designer.cs <span style='color:#111;'> 2.59KB </span>","children":null,"spread":false},{"title":"System.Windows.Forms.dll <span style='color:#111;'> 4.79MB </span>","children":null,"spread":false},{"title":"XmlConfigRead.csproj <span style='color:#111;'> 3.35KB </span>","children":null,"spread":false},{"title":"Form1.resx <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false}],"spread":true},{"title":"CreateFormfromXML.sln <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false},{"title":"CreateFormfromXML","children":[{"title":"XmlForm.cs <span style='color:#111;'> 4.18KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Debug","children":[{"title":"CreateFormfromXML.pdb <span style='color:#111;'> 27.50KB </span>","children":null,"spread":false},{"title":"CreateFormfromXML.exe <span style='color:#111;'> 9.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"obj","children":[{"title":"Debug","children":[{"title":"CreateFormfromXML.csproj.GenerateResource.Cache <span style='color:#111;'> 850B </span>","children":null,"spread":false},{"title":"ResolveAssemblyReference.cache <span style='color:#111;'> 4.99KB </span>","children":null,"spread":false},{"title":"CreateFormfromXML.FormMain.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"CreateFormfromXML.csproj.FileListAbsolute.txt <span style='color:#111;'> 981B </span>","children":null,"spread":false},{"title":"CreateFormfromXML.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"Refactor","children":null,"spread":false},{"title":"CreateFormfromXML.pdb <span style='color:#111;'> 27.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"CreateFormfromXML.exe <span style='color:#111;'> 9.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Properties","children":[{"title":"Resources.Designer.cs <span style='color:#111;'> 2.32KB </span>","children":null,"spread":false},{"title":"Resources.resx <span style='color:#111;'> 5.49KB </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false}],"spread":true},{"title":"Program.cs <span style='color:#111;'> 367B </span>","children":null,"spread":false},{"title":"FormMain.cs <span style='color:#111;'> 2.10KB </span>","children":null,"spread":false},{"title":"FormMain.resx <span style='color:#111;'> 6.15KB </span>","children":null,"spread":false},{"title":"CreateFormfromXML.csproj <span style='color:#111;'> 3.96KB </span>","children":null,"spread":false},{"title":"FormMain.Designer.cs <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false},{"title":"CreateFormfromXML.csproj.user <span style='color:#111;'> 198B </span>","children":null,"spread":false}],"spread":true},{"title":"FormConfig.xml <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false}],"spread":true}]

评论信息

  • andybogard0768 :
    还可以,但是第二个项目XmlConfigRead好像没有用?
    2016-05-31
  • aa13551411 :
    方法值得学习 但是只要生成xml 没有读取xml
    2015-06-21
  • lh258 :
    非常不错的例子,我的应用和这个例子场景差不多,n多个界面,界面中n多种情况,不同种情况下界面的控件元素又不一样,如果需求不明确的情况下硬编码会导致修改非常麻烦。我昨天的思路是通过xml文件配置+反射解
    2014-10-07
  • duxipeng149 :
    可以,应用挺好的
    2014-09-18
  • u012306447 :
    值得学习,很有用处.
    2014-07-13

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明