以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XML在软件工程中的应用 』  (http://bbs.xml.org.cn/list.asp?boardid=6)
----  根据XML文件的描述,用VC动态生成一个界面?  (http://bbs.xml.org.cn/dispbbs.asp?boardid=6&rootid=&id=30006)


--  作者:holden
--  发布时间:4/5/2006 4:41:00 PM

--  根据XML文件的描述,用VC动态生成一个界面?
哪位能举个简单的例子来说明一下.XML文件中描述了界面中的各种控件及布局,要用VC来实现?
--  作者:dancetime
--  发布时间:7/15/2006 10:44:00 AM

--  
XAML?不过现在还不支持啊。那就得自己定义格式罗。
--  作者:floraxue
--  发布时间:4/6/2007 8:21:00 PM

--  
天哪,终于见到战友了.虽然是近一年前的帖子,可是你要欣慰啊.我也想知道这个问题啊!!!可是,这个论坛怎么就是看的人多,解决问题的人少呢?

前辈,你的问题解决了吗?有答案的话指点小妹一下.:)


--  作者:ljun_ufe
--  发布时间:10/28/2007 10:18:00 AM

--  
有哪个哥们会做毕业设计"中文复制检测系统"用的是VC界面.多谢
--  作者:zhiweiy
--  发布时间:4/14/2008 12:22:00 AM

--  
啊,又隔了一年了。。。
--  作者:1500053
--  发布时间:5/10/2008 8:55:00 PM

--  
又过了近1个月...
--  作者:dancetime
--  发布时间:5/12/2008 11:29:00 AM

--  
其实非常简单,关键是自己要定义一个记录控件信息的XML文件的格式。我举例说明下:
比如在屏幕上有个按钮,大小是20X10,位置是(50,80),那么写个XML文件记录这个信息
......
<Button>
    <name>button1<name/>
    <size_w>20<size_w/>
    <size_h>10<size_h/>
    <x>50<x/>
    <y>80<y/>
<Button/>
......
然后在程序里面读取XML的信息,根据这个信息把Button描画出来就OK了。
--  作者:liruiba
--  发布时间:8/16/2008 10:05:00 PM

--  
嘿嘿,,最近再写个程序 ,公司要求将pb中的窗据窗(其中的sql语句,列宽、颜色、字体、……)直接移到。NET中。
我的解决方法就是提取pb数据窗信息的那份文件中控件名称,数据字段,最后生成xml文档,最后在控件加载的时候读取xml中的信息
<?xml version="1.0"?>
<liruibaXMLRoot>
  <CtrlTables CtrlKind="  SELECT &quot;B_FLUX_STOCK&quot;.&quot;TIC_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_TIME&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;QUANTITY&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;REMARK&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;AUDIT_FLAG&quot;,     &quot;B_FLUX_STOCK&quot;.&quot;T_DESTINATION&quot;      FROM &quot;B_FLUX_STOCK&quot;       WHERE ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot; = 'F' ) AND      (&quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;='L') AND            ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot; = '*****' ) AND      ( &quot;B_FLUX_STOCK&quot;.&quot;ID_CODE&quot;='#####')     ">
    <name>tic_code</name>
    <text>票类</text>
    <width>233</width>
    <x>352</x>
    <font.face>宋体</font.face>
    <background.color>82042848</background.color>
    <updatewhereclause>yes</updatewhereclause>
    <dbname>b_flux_stock.tic_code</dbname>
    <Columnwidth>233</Columnwidth>
  </CtrlTables>
  <CtrlTables CtrlKind="  SELECT &quot;B_FLUX_STOCK&quot;.&quot;TIC_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_TIME&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;QUANTITY&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;REMARK&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;AUDIT_FLAG&quot;,     &quot;B_FLUX_STOCK&quot;.&quot;T_DESTINATION&quot;      FROM &quot;B_FLUX_STOCK&quot;       WHERE ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot; = 'F' ) AND      (&quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;='L') AND            ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot; = '*****' ) AND      ( &quot;B_FLUX_STOCK&quot;.&quot;ID_CODE&quot;='#####')     ">
    <name>b_tno</name>
    <text>开始票号</text>
    <width>439</width>
    <x>594</x>
    <font.face>宋体</font.face>
    <background.color>82042848</background.color>
    <updatewhereclause>yes</updatewhereclause>
    <dbname>b_flux_stock.b_tno</dbname>
    <Columnwidth>439</Columnwidth>
  </CtrlTables>
  <CtrlTables CtrlKind="  SELECT &quot;B_FLUX_STOCK&quot;.&quot;TIC_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_TIME&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;QUANTITY&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;REMARK&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;AUDIT_FLAG&quot;,     &quot;B_FLUX_STOCK&quot;.&quot;T_DESTINATION&quot;      FROM &quot;B_FLUX_STOCK&quot;       WHERE ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot; = 'F' ) AND      (&quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;='L') AND            ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot; = '*****' ) AND      ( &quot;B_FLUX_STOCK&quot;.&quot;ID_CODE&quot;='#####')     ">
    <name>e_tno</name>
    <text>结束票号</text>
    <width>439</width>
    <x>1042</x>
    <font.face>宋体</font.face>
    <background.color>82042848</background.color>
    <updatewhereclause>yes</updatewhereclause>
    <dbname>b_flux_stock.e_tno</dbname>
    <Columnwidth>439</Columnwidth>
  </CtrlTables>
  <CtrlTables CtrlKind="  SELECT &quot;B_FLUX_STOCK&quot;.&quot;TIC_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_TIME&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;QUANTITY&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;REMARK&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;AUDIT_FLAG&quot;,     &quot;B_FLUX_STOCK&quot;.&quot;T_DESTINATION&quot;      FROM &quot;B_FLUX_STOCK&quot;       WHERE ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot; = 'F' ) AND      (&quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;='L') AND            ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot; = '*****' ) AND      ( &quot;B_FLUX_STOCK&quot;.&quot;ID_CODE&quot;='#####')     ">
    <name>input_time</name>
    <text>领用时间</text>
    <width>603</width>
    <x>1490</x>
    <font.face>宋体</font.face>
    <background.color>82042848</background.color>
    <updatewhereclause>yes</updatewhereclause>
    <dbname>b_flux_stock.input_time</dbname>
    <Columnwidth>603</Columnwidth>
  </CtrlTables>
  <CtrlTables CtrlKind="  SELECT &quot;B_FLUX_STOCK&quot;.&quot;TIC_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_TIME&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;QUANTITY&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;REMARK&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;AUDIT_FLAG&quot;,     &quot;B_FLUX_STOCK&quot;.&quot;T_DESTINATION&quot;      FROM &quot;B_FLUX_STOCK&quot;       WHERE ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot; = 'F' ) AND      (&quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;='L') AND            ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot; = '*****' ) AND      ( &quot;B_FLUX_STOCK&quot;.&quot;ID_CODE&quot;='#####')     ">
    <name>quantity</name>
    <text>数量</text>
    <width>329</width>
    <x>2103</x>
    <font.face>宋体</font.face>
    <background.color>82042848</background.color>
    <updatewhereclause>yes</updatewhereclause>
    <dbname>b_flux_stock.quantity</dbname>
    <Columnwidth>329</Columnwidth>
  </CtrlTables>
  <CtrlTables CtrlKind="  SELECT &quot;B_FLUX_STOCK&quot;.&quot;TIC_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_TIME&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;QUANTITY&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;REMARK&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;AUDIT_FLAG&quot;,     &quot;B_FLUX_STOCK&quot;.&quot;T_DESTINATION&quot;      FROM &quot;B_FLUX_STOCK&quot;       WHERE ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot; = 'F' ) AND      (&quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;='L') AND            ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot; = '*****' ) AND      ( &quot;B_FLUX_STOCK&quot;.&quot;ID_CODE&quot;='#####')     ">
    <name>input_person</name>
    <text>录入员</text>
    <width>576</width>
    <x>2441</x>
    <font.face>宋体</font.face>
    <background.color>82042848</background.color>
    <updatewhereclause>yes</updatewhereclause>
    <dbname>b_flux_stock.input_person</dbname>
    <Columnwidth>576</Columnwidth>
  </CtrlTables>
  <CtrlTables CtrlKind="  SELECT &quot;B_FLUX_STOCK&quot;.&quot;TIC_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_TIME&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;QUANTITY&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;REMARK&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;AUDIT_FLAG&quot;,     &quot;B_FLUX_STOCK&quot;.&quot;T_DESTINATION&quot;      FROM &quot;B_FLUX_STOCK&quot;       WHERE ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot; = 'F' ) AND      (&quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;='L') AND            ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot; = '*****' ) AND      ( &quot;B_FLUX_STOCK&quot;.&quot;ID_CODE&quot;='#####')     ">
    <name>remark</name>
    <text>备注</text>
    <width>567</width>
    <x>3026</x>
    <font.face>宋体</font.face>
    <background.color>82042848</background.color>
    <updatewhereclause>yes</updatewhereclause>
    <dbname>b_flux_stock.remark</dbname>
    <Columnwidth>567</Columnwidth>
  </CtrlTables>
  <CtrlTables CtrlKind="  SELECT &quot;B_FLUX_STOCK&quot;.&quot;TIC_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_TNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_TIME&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;QUANTITY&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;REMARK&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;B_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;E_CNO&quot;,              &quot;B_FLUX_STOCK&quot;.&quot;AUDIT_FLAG&quot;,     &quot;B_FLUX_STOCK&quot;.&quot;T_DESTINATION&quot;      FROM &quot;B_FLUX_STOCK&quot;       WHERE ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_FLAG&quot; = 'F' ) AND      (&quot;B_FLUX_STOCK&quot;.&quot;OPERATE_CODE&quot;='L') AND            ( &quot;B_FLUX_STOCK&quot;.&quot;INPUT_PERSON&quot; = '*****' ) AND      ( &quot;B_FLUX_STOCK&quot;.&quot;ID_CODE&quot;='#####')     ">
    <name>t_destination</name>
    <text>代理人代码</text>
    <width>334</width>
    <x>9</x>
    <font.face>宋体</font.face>
    <background.color>82042848</background.color>
    <updatewhereclause>yes</updatewhereclause>
    <dbname>b_flux_stock.t_destination</dbname>
    <Columnwidth>334</Columnwidth>
  </CtrlTables>
</liruibaXMLRoot>


--  作者:skzore
--  发布时间:1/19/2009 2:58:00 AM

--  
看了头疼。。。。。。
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
140.625ms