我们可以在visual studio中像Windows窗体一样运行和执行这个xml代码 [英] can we run and execute this xml code like a windows form in visual studio

查看:135
本文介绍了我们可以在visual studio中像Windows窗体一样运行和执行这个xml代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<Form_Modal

	Text="Test1"

	ControlVSpacing="3"

	Name="Test1"

	Size="850,650"

	IconPath="[gApplicationIcon]"

	Pos="C">

	<var name="TableName" value="AC_Animals" />

	<var name="EditFields_Height" value="160" />

	<var name="EditFields">

		<Header Top="+5" Name="Header_General" Caption=" General Information" LineColor="#12527C"/>

		<var name="PKEY" />

		<textbox>
			Name="Animal_Name"
			Caption="Animals Name"
			TabStop="True"
			CaptionWidth="100"
			Style="[style_EditFields]"/>

		<textbox>
			Name="Animal_Code"
			Caption="Animals Code"
			TabStop="True"
			CaptionWidth="100"
			Style="[style_EditFields]"/>

		<textbox>
			Name="Animal_Age"
			Caption="Animals Age"
			TabStop="True"
			CaptionWidth="100"
			Style="[style_EditFields]"/>

		<popup>
			NAME="Animal_CountryID"
			CAPTION="Country"
			Nullable="True"
			TabStop="True"
			QuickLookup_YN="True"
			QuickLookupBackColor="Yellow"
			CaptionWidth="100"
			Style="[style_EditFields]"/>

	</popup></textbox></textbox></textbox></var>

	<var name="EditFields_In">
		PKEY:Animals_ID
		Animal_Name:Animals_Name
		Animal_Code:Animals_Code
		Animal_Age:Animals_Age
		Animal_CountryID:Animals_CountryID
		Animal_CountryID.TextDisplay:country_Description
	</var>

	<var name="EditFields_Out" value="[Me['EditFields_In']]" />

	<var name="FilterFields_Height" value="30" />

	<var name="FilterFields">

		<textbox>
			DelayTextChange="[Search_Delay]"
			Name="simpleFilter"
			Top="+6"
			TabStop="False"
			Style="[style_EditFields]"
			Caption="Search"/>

	</textbox></var>

	<var name="FilterFields_Out" value="PKEY:PKEY,simpleFilter:simpleFilter" />

	<var name="simpleFilter_TextChanged">
		Me['PKEY']= ""
		GOS.Parse(Me['FillList'])
	</var>

	<var name="ListBox">
		<listbox columnheadings=",Name,Code,Age,Country" columnjustifications="L,L,L,L,L" columnwidths="0,40,20,10,30" style="[Style_StandardListBox]" />
	</var>

	<var name="Animal_CountryID_PopupClicked">
		G = Me['Animal_CountryID'].Text
		gLastPressed = Me['Animal_CountryID'].LastPressed
		RunQ('POPUP_Countries')
		if not GOS.General.isObjectEmpty(G) == True :
			Me['Animal_CountryID'].Text = G
			Me['Animal_CountryID'].TextDisplay = SQL.GetValue("Select dbo.fn_v_Get_Countries_Description(" + G + ")")
	</var>

	<var name="Animal_CountryID_QuickLookup">
		Me['LookupText']=Me['Animal_CountryID'].QuickLookupText
		if Me['LookupText'] !="" :
			Me["LookupP"]=""
			Me["LookupP"]=GOS.General.SetXMLValue(Me["LookupP"],"NRows2Return","1")
			Me["LookupP"]=GOS.General.SetXMLValue(Me["LookupP"],"simpleFilter",Me['LookupText'])
			Me["RetValues"]=SQL.Execute("exec dbo.pr_List_Countries" + GOS.General.SQ(Me["LookupP"]))
			Me["LookupID"]=GOS.General.GetXMLValue(Me["RetValues"],"COUNTRY_ID")
			if Me["LookupID"] != "":
				Me['Animal_CountryID'].Text=Me["LookupID"]
				Me['Animal_CountryID'].TextDisplay =GOS.General.GetXMLValue(SQL.Execute("Select dbo.fn_v_Get_Countries_Description("+ Me["LookupID"]+")N"),"N")
				Me['Animal_CountryID'].QuickLookupOK  = True
			else:
				Me['Animal_CountryID'].QuickLookupOK  = False
	</var>

	<var name="CustomProcedures">
		GOS.SetObjectEvent(Me['Simplefilter'],"Textchanged",Me['SimpleFilter_TextChanged'])
		GOS.SetObjectEvent(Me['Animal_CountryID'],"PopupClicked",Me['Animal_CountryID_PopupClicked']) 
		GOS.SetObjectEvent(Me['Animal_CountryID'],"QuickLookup",Me['Animal_CountryID_QuickLookup'])
	</var>

	<panel dock="Fill">
	[gDataEntryForm_Layout]
	</panel>
	<panel>
	[gDataEntryForm_Logic]
	</panel>

</Form_Modal>



[edit]已添加代码块 - OriginalGriff [/ edit]


[edit]Code block added - OriginalGriff[/edit]

推荐答案

没有这样的概念,执行XML代码。可能有一些运行时系统只从XML读取数据并将此数据用作一组指令,比如用于构建一些UI。这一切都可以开发,但在这一点上......你只是一无所知。



-SA
There is no such concept, "execute XML code". It's possible to have some runtime system which just reads data from XML and uses this data as a set of instructions, say, for building some UI. This is all can be developed, but at this point… you are just asking about nothing.

—SA


这篇关于我们可以在visual studio中像Windows窗体一样运行和执行这个xml代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆