选择显示字体大小

用asp.net写你自己的代码生成器


最近写实体类集合类控制类什么的太“类”了,因此就花了点时间写了个代码生成器,与大家共享!

frmmain.aspx

<%@ page language=&quot;c#&quot; codebehind=&quot;frmmain.aspx.cs&quot; autoeventwireup=&quot;false&quot; inherits=&quot;web_test.frmmain&quot; %>
<!doctype html public &quot;-//w3c//dtd html 4.0 transitional//en&quot; >
<html>
<head>
<title>frmmain</title>
<meta name=&quot;generator&quot; content=&quot;microsoft visual studio 7.0&quot;>
<meta name=&quot;code_language&quot; content=&quot;c#&quot;>
<meta name=&quot;vs_defaultclientscript&quot; content=&quot;javascript&quot;>
<meta name=&quot;vs_targetschema&quot; content=&quot;http://schemas.microsoft.com/intellisense/ie5&quot;>
</head>
<body ms_positioning=&quot;gridlayout&quot;>
<form id=&quot;frmmain&quot; method=&quot;post&quot; runat=&quot;server&quot;>
<asp:textbox id=&quot;txtservername&quot; style=&quot;z-index: 101; left: 116px; position: absolute; top: 24px; design_time_lock: true&quot; runat=&quot;server&quot; font-size=&quot;10pt&quot; design_time_lock=&quot;true&quot;>192.168.0.220</asp:textbox>
<asp:label id=&quot;label7&quot; style=&quot;z-index: 112; left: 24px; position: absolute; top: 98px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;79px&quot; height=&quot;20px&quot; font-size=&quot;10pt&quot; design_time_lock=&quot;true&quot;>数据库列表</asp:label>
<asp:label id=&quot;label6&quot; style=&quot;z-index: 111; left: 27px; position: absolute; top: 169px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;53px&quot; height=&quot;20px&quot; font-size=&quot;10pt&quot; design_time_lock=&quot;true&quot; visible=&quot;false&quot;>字段名</asp:label>
<asp:label id=&quot;label5&quot; style=&quot;z-index: 109; left: 27px; position: absolute; top: 135px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;53px&quot; height=&quot;20px&quot; font-size=&quot;10pt&quot; design_time_lock=&quot;true&quot;>表名</asp:label>
<asp:button id=&quot;button1&quot; style=&quot;z-index: 107; left: 496px; position: absolute; top: 91px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;102px&quot; text=&quot;gettable&quot; font-size=&quot;10pt&quot; design_time_lock=&quot;true&quot;></asp:button>
<asp:label id=&quot;label4&quot; style=&quot;z-index: 106; left: 288px; position: absolute; top: 63px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;79px&quot; height=&quot;20px&quot; font-size=&quot;10pt&quot; design_time_lock=&quot;true&quot;>密码</asp:label>
<asp:label id=&quot;label2&quot; style=&quot;z-index: 105; left: 25px; position: absolute; top: 61px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;79px&quot; height=&quot;20px&quot; font-size=&quot;10pt&quot; design_time_lock=&quot;true&quot;>用户名</asp:label>
<asp:label id=&quot;label1&quot; style=&quot;z-index: 104; left: 25px; position: absolute; top: 28px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;79px&quot; height=&quot;20px&quot; font-size=&quot;10pt&quot; design_time_lock=&quot;true&quot;>服务器名</asp:label>
<asp:textbox id=&quot;txtpassword&quot; style=&quot;z-index: 103; left: 376px; position: absolute; top: 60px; design_time_lock: true&quot; runat=&quot;server&quot; font-size=&quot;10pt&quot; backcolor=&quot;transparent&quot; forecolor=&quot;black&quot; bordercolor=&quot;white&quot; design_time_lock=&quot;true&quot;></asp:textbox>
<asp:textbox id=&quot;txtusername&quot; style=&quot;z-index: 102; left: 116px; position: absolute; top: 62px; design_time_lock: true&quot; runat=&quot;server&quot; font-size=&quot;10pt&quot; design_time_lock=&quot;true&quot;>sa</asp:textbox>
<asp:dropdownlist id=&quot;dropdownlist1&quot; style=&quot;z-index: 108; left: 115px; position: absolute; top: 135px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;208px&quot; autopostback=&quot;true&quot; font-size=&quot;10pt&quot; design_time_lock=&quot;true&quot;></asp:dropdownlist>
<asp:dropdownlist id=&quot;dropdownlist2&quot; style=&quot;z-index: 110; left: 115px; position: absolute; top: 171px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;208px&quot; height=&quot;28px&quot; font-size=&quot;10pt&quot; design_time_lock=&quot;true&quot; visible=&quot;false&quot;></asp:dropdownlist>
<asp:button id=&quot;button2&quot; style=&quot;z-index: 113; left: 355px; position: absolute; top: 92px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;107px&quot; text=&quot;getdatabase&quot; design_time_lock=&quot;true&quot;></asp:button>
<asp:dropdownlist id=&quot;dropdownlist3&quot; style=&quot;z-index: 114; left: 115px; position: absolute; top: 98px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;207px&quot; height=&quot;25px&quot; design_time_lock=&quot;true&quot;></asp:dropdownlist>
<asp:button id=&quot;button3&quot; style=&quot;z-index: 115; left: 354px; position: absolute; top: 132px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;110px&quot; text=&quot;生 成&quot; design_time_lock=&quot;true&quot; visible=&quot;false&quot;></asp:button>
<asp:textbox id=&quot;txtlayout&quot; style=&quot;z-index: 117; left: 26px; position: absolute; top: 206px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;619px&quot; height=&quot;367px&quot; textmode=&quot;multiline&quot; backcolor=&quot;ivory&quot; design_time_lock=&quot;true&quot;></asp:textbox>
<asp:button id=&quot;button4&quot; style=&quot;z-index: 118; left: 497px; position: absolute; top: 130px; design_time_lock: true&quot; runat=&quot;server&quot; height=&quot;25px&quot; width=&quot;105px&quot; text=&quot;实体类&quot; design_time_lock=&quot;true&quot;></asp:button>
<asp:button id=&quot;button5&quot; style=&quot;z-index: 119; left: 355px; position: absolute; top: 171px; design_time_lock: true&quot; runat=&quot;server&quot; width=&quot;107px&quot; text=&quot;test&quot; height=&quot;25px&quot; design_time_lock=&quot;true&quot; visible=&quot;false&quot;></asp:button>
<asp:button id=&quot;button6&quot; style=&quot;z-index: 120; left: 499px; position: absolute; top: 171px; design_time_lock: true&quot; runat=&quot;server&quot; height=&quot;23px&quot; width=&quot;105px&quot; text=&quot;集合类&quot; design_time_lock=&quot;true&quot; visible=&quot;false&quot;></asp:button>
</form>
</body>
</html>
frmmain.aspx.cs

using system;
using system.collections;
using system.componentmodel;
using system.data;
using system.data.sqlclient;
using system.drawing;
using system.web;
using system.web.sessionstate;
using system.web.ui;
using system.web.ui.webcontrols;
using system.web.ui.htmlcontrols;

namespace web_test
{
/// <summary>
/// 作者:davi
/// 日期:3003-03-18
/// </summary>
public class frmmain : system.web.ui.page
{
protected system.web.ui.webcontrols.label label1;
protected system.web.ui.webcontrols.label label2;
protected system.web.ui.webcontrols.label label4;
protected system.web.ui.webcontrols.dropdownlist dropdownlist1;
protected system.web.ui.webcontrols.label label5;
protected system.web.ui.webcontrols.textbox txtservername;
protected system.web.ui.webcontrols.textbox txtusername;
protected system.web.ui.webcontrols.textbox txtpassword;
protected system.web.ui.webcontrols.button button1;
protected system.web.ui.webcontrols.dropdownlist dropdownlist2;
protected system.web.ui.webcontrols.label label6;
protected system.web.ui.webcontrols.label label7;
protected system.web.ui.webcontrols.button button2;
protected system.web.ui.webcontrols.dropdownlist dropdownlist3;
protected system.web.ui.webcontrols.button button3;
protected system.web.ui.webcontrols.textbox txtlayout;
protected system.web.ui.webcontrols.button button4;
protected system.web.ui.webcontrols.button button5;
protected system.web.ui.webcontrols.button button6;
private sqlconnection m_scon;
private dataset m_ds;

private void page_load(object sender, system.eventargs e)
{
m_scon = new sqlconnection();
m_ds = new dataset();
}


#region web form designer generated code
//[stathreadattribute]
override protected void oninit(eventargs e)
{
//
// codegen:该调用是 asp.net web 窗体设计器所必需的。
//
initializecomponent();
base.oninit(e);
}

/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void initializecomponent()
{
this.button1.click += new system.eventhandler(this.button1_click);
this.dropdownlist1.selectedindexchanged += new system.eventhandler(this.dropdownlist1_selectedindexchanged);
this.button2.click += new system.eventhandler(this.button2_click);
this.button3.click += new system.eventhandler(this.button3_click);
this.button4.click += new system.eventhandler(this.button4_click);
this.button5.click += new system.eventhandler(this.button5_click);
this.button6.click += new system.eventhandler(this.button6_click);
this.load += new system.eventhandler(this.page_load);

}
#endregion

#region 显示数据库的表 button1_click
/// <summary>
/// 显示数据库的表
/// </summary>
/// <param name=&quot;sender&quot;></param>
/// <param name=&quot;e&quot;></param>
private void button1_click(object sender, system.eventargs e)
{
try
{
m_scon.connectionstring = &quot;user id=&quot;+this.txtusername.text+
&quot;;password=&quot;+this.txtpassword.text+
&quot;;initial catalog=&quot;+this.dropdownlist3.selecteditem.text+
&quot;;data source=&quot;+this.txtservername.text;
sqlcommand m_scmd = new sqlcommand(&quot;sp_tables&quot;,m_scon);
m_scmd.commandtype = commandtype.storedprocedure;
sqlparameter myparm = m_scmd.parameters.add(&quot;@table_type&quot;,sqldbtype.varchar,100);
myparm.value = &quot;'table'&quot;;
m_scon.open();
sqldatareader m_sdr = m_scmd.executereader();
this.dropdownlist1.items.clear();
while(m_sdr.read())
{
if(m_sdr[&quot;table_name&quot;].tostring()!=&quot;dtproperties&quot;)
{
listitem m_li = new listitem();
m_li.text = m_sdr[&quot;table_name&quot;].tostring();
m_li.value = m_sdr[&quot;table_name&quot;].tostring();
this.dropdownlist1.items.add(m_li);
}
}
m_sdr.close();
m_scon.close();
}
catch
{
if(m_scon.state.tostring().toupper()==&quot;open&quot;)
{
m_scon.close();
}
}
}

#endregion

#region show columns in a table dropdownlist1_selectedindexchanged
/// <summary>
/// 显示表的所有列
/// </summary>
/// <param name=&quot;sender&quot;></param>
/// <param name=&quot;e&quot;></param>
private void dropdownlist1_selectedindexchanged(object sender, system.eventargs e)
{
try
{
if(this.dropdownlist1.selectedindex!=-1)
{
m_scon.connectionstring = &quot;user id=&quot;+this.txtusername.text+
&quot;;password=&quot;+this.txtpassword.text+
&quot;;initial catalog=&quot;+this.dropdownlist3.selecteditem.text+
&quot;;data source=&quot;+this.txtservername.text;
sqlcommand m_scmd = new sqlcommand(&quot;sp_columns&quot;,m_scon);
m_scmd.commandtype = commandtype.storedprocedure;
sqlparameter myparm = m_scmd.parameters.add(&quot;@table_name&quot;,sqldbtype.varchar,100);
myparm.value = this.dropdownlist1.selecteditem.value;
m_scon.open();
sqldatareader m_sdr = m_scmd.executereader();
this.dropdownlist2.items.clear();
while(m_sdr.read())
{
listitem m_li = new listitem();
m_li.text = m_sdr[&quot;column_name&quot;].tostring();
m_li.value = m_sdr[&quot;column_name&quot;].tostring();
this.dropdownlist2.items.add(m_li);
}
m_sdr.close();
m_scon.close();
}
}
catch
{
if(m_scon.state.tostring().toupper()==&quot;open&quot;)
{
m_scon.close();
}
}
}

#endregion

#region show all database button2_click
/// <summary>
/// 显示所有数据库
/// </summary>
/// <param name=&quot;sender&quot;></param>
/// <param name=&quot;e&quot;></param>
private void button2_click(object sender, system.eventargs e)
{
try
{
m_scon.connectionstring = &quot;user id=&quot;+this.txtusername.text+
&quot;;password=&quot;+this.txtpassword.text+
&quot;;data source=&quot;+this.txtservername.text;
sqlcommand m_scmd = new sqlcommand(&quot;sp_databases&quot;,m_scon);
m_scmd.commandtype = commandtype.storedprocedure;
m_scon.open();
sqldatareader m_sdr = m_scmd.executereader();
this.dropdownlist1.items.clear();
while(m_sdr.read())
{
listitem m_li = new listitem();
m_li.text = m_sdr[&quot;database_name&quot;].tostring();
m_li.value = m_sdr[&quot;database_name&quot;].tostring();
this.dropdownlist3.items.add(m_li);
}
m_sdr.close();
m_scon.close();
}
catch
{
if(m_scon.state.tostring().toupper()==&quot;open&quot;)
{
m_scon.close();
}
}
}

#endregion
#region make form
/// <summary>
/// 生成表单项
/// </summary>
/// <param name=&quot;sender&quot;></param>
/// <param name=&quot;e&quot;></param>
private void button3_click(object sender, system.eventargs e)
{
if(this.dropdownlist1.selectedindex!=-1)
{
m_scon.connectionstring = &quot;user id=&quot;+this.txtusername.text+
&quot;;password=&quot;+this.txtpassword.text+
&quot;;initial catalog=&quot;+this.dropdownlist3.selecteditem.text+
&quot;;data source=&quot;+this.txtservername.text;
sqlcommand m_scmd = new sqlcommand(&quot;sp_columns&quot;,m_scon);
m_scmd.commandtype = commandtype.storedprocedure;
sqlparameter myparm = m_scmd.parameters.add(&quot;@table_name&quot;,sqldbtype.varchar,100);
myparm.value = this.dropdownlist1.selecteditem.value;
m_scon.open();
sqldatareader m_sdr = m_scmd.executereader();
string colname = &quot;&quot;;
string coltype = &quot;&quot;;
while(m_sdr.read())
{
colname = m_sdr[&quot;column_name&quot;].tostring();
coltype = m_sdr[&quot;type_name&quot;].tostring();
}
m_sdr.close();
m_scon.close();
}
}
#endregion

#region make object
/// <summary>
/// 生成实体
/// </summary>
/// <param name=&quot;sender&quot;></param>
/// <param name=&quot;e&quot;></param>
private void button4_click(object sender, system.eventargs e)
{
if(this.dropdownlist1.selectedindex!=-1)
{
m_scon.connectionstring = &quot;user id=&quot;+this.txtusername.text+
&quot;;password=&quot;+this.txtpassword.text+
&quot;;initial catalog=&quot;+this.dropdownlist3.selecteditem.text+
&quot;;data source=&quot;+this.txtservername.text;
sqlcommand m_scmd = new sqlcommand(&quot;sp_columns&quot;,m_scon);
m_scmd.commandtype = commandtype.storedprocedure;
sqlparameter myparm = m_scmd.parameters.add(&quot;@table_name&quot;,sqldbtype.varchar,100);
myparm.value = this.dropdownlist1.selecteditem.value;
m_scon.open();
sqldatareader m_sdr = m_scmd.executereader();
string tablename = this.dropdownlist1.selecteditem.value;
string m_layout = &quot;&quot;;

m_layout = m_layout + &quot;using system;\r\n&quot;;
m_layout = m_layout + &quot;using system.data;\r\n&quot; ;
m_layout = m_layout + &quot;using system.data.sqlclient;\r\n&quot;;
m_layout = m_layout + &quot;\r\n&quot;;
m_layout = m_layout + &quot;namespace oceansoft\r\n&quot;;
m_layout = m_layout + &quot;{\r\n&quot;;

m_layout = m_layout + bl(4) + &quot;///<comment>\r\n&quot;;
m_layout = m_layout + bl(4) + &quot;///\r\n&quot;;
m_layout = m_layout + bl(4) + &quot;///</comment>\r\n&quot;;

string colname = &quot;&quot;;  //列名
string coltype = &quot;&quot;;  //列的数据类型
string coldefine = &quot;&quot;;  //列定义
string colproperty = &quot;&quot;; //列属性
while(m_sdr.read())
{
colname = m_sdr[&quot;column_name&quot;].tostring();
coltype = gt(m_sdr[&quot;type_name&quot;].tostring());

coldefine = coldefine + bl(8) + &quot;private &quot; + coltype + &quot; m_&quot; + colname + &quot;;\r\n&quot;;

colproperty = colproperty + bl(8) + &quot;\r\n&quot;;
colproperty = colproperty + bl(8) + &quot;public &quot; + coltype + &quot; &quot; + colname + &quot;\r\n&quot;;
colproperty = colproperty + bl(8) + &quot;{\r\n&quot;;
colproperty = colproperty + bl(12) + &quot;get\r\n&quot;;
colproperty = colproperty + bl(12) + &quot;{\r\n&quot;;
colproperty = colproperty + bl(16) + &quot;return m_&quot; + colname + &quot; ;\r\n&quot;;
colproperty = colproperty + bl(12) + &quot;}\r\n&quot;;
colproperty = colproperty + bl(12) + &quot;set\r\n&quot;;
colproperty = colproperty + bl(12) + &quot;{\r\n&quot;;
colproperty = colproperty + bl(16) + &quot;m_&quot; + colname + &quot; = value ;\r\n&quot;;
colproperty = colproperty + bl(12) + &quot;}\r\n&quot;;
colproperty = colproperty + bl(8) + &quot;}\r\n&quot;;

}
m_sdr.close();
m_scon.close();

m_layout = m_layout + bl(4) + &quot;public class &quot; + tablename + &quot;\r\n&quot;;
m_layout = m_layout + bl(4) + &quot;{\r\n&quot;;

m_layout = m_layout + bl(4) + &quot;\r\n&quot;;
m_layout = m_layout + coldefine; //定义

m_layout = m_layout + bl(8) + &quot;///<summary>\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;///构造函数\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;///<summary>\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;public &quot; + tablename + &quot;()\r\n&quot;; //构造函数
m_layout = m_layout + bl(8) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;}\r\n\r\n&quot;;

m_layout = m_layout + bl(8) + &quot;///<summary>\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;///析构函数\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;///<summary>\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;~&quot; + tablename + &quot;()\r\n&quot;; //析构函数
m_layout = m_layout + bl(8) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;}\r\n&quot;;

m_layout = m_layout + colproperty; //实体属性

m_layout = m_layout + bl(4) + &quot;}\r\n&quot;;

m_layout = m_layout + &quot;}\r\n&quot;;

this.txtlayout.text = m_layout;
}
}
#endregion

#region test
private void button5_click(object sender, system.eventargs e)
{
//
}
#endregion

#region functions
private string bl(int values)
{
switch(values)
{
case 4:
return &quot;\t&quot;;
case 8:
return &quot;\t\t&quot;;
case 12:
return &quot;\t\t\t&quot;;
case 16:
return &quot;\t\t\t\t&quot;;
case 20:
return &quot;\t\t\t\t\t&quot;;
}
return &quot;&quot;;
}

private string gt(string values)
{
switch(values.toupper())
{
case &quot;int&quot;:
return &quot;int&quot;;
case &quot;nvarchar&quot;:
return &quot;string&quot;;
case &quot;tinyint&quot;:
return &quot;int&quot;;
case &quot;int identity&quot;:
return &quot;int&quot;;
case &quot;bit&quot;:
return &quot;int&quot;;
case &quot;uniqueidentifier&quot;:
return &quot;string&quot;;
case &quot;datetime&quot;:
return &quot;string&quot;;
case &quot;varchar&quot;:
return &quot;string&quot;;
default:
return &quot;string&quot;;
}
}
#endregion

#region make object collection class
private void button6_click(object sender, system.eventargs e)
{
if(this.dropdownlist1.selectedindex!=-1)
{
string tablename = this.dropdownlist1.selecteditem.value;
string m_layout = &quot;&quot;;

m_layout = m_layout + &quot;using system;\r\n&quot;;
m_layout = m_layout + &quot;using system.data;\r\n&quot; ;
m_layout = m_layout + &quot;using system.data.sqlclient;\r\n&quot;;
m_layout = m_layout + &quot;using system.collections;\r\n&quot;;
m_layout = m_layout + &quot;\r\n&quot;;

m_layout = m_layout + &quot;namespace e3.pantheon.workflow.structure\r\n&quot;;
m_layout = m_layout + &quot;{\r\n&quot;;

m_layout = m_layout + bl(4) + &quot;///<comment>\r\n&quot;;
m_layout = m_layout + bl(4) + &quot;///公司名称:苏州中软公司\r\n&quot;;
m_layout = m_layout + bl(4) + &quot;///作者:\r\n&quot;;
m_layout = m_layout + bl(4) + &quot;///创建日期:&quot;+system.datetime.now.toshortdatestring()+&quot;\r\n&quot;;
m_layout = m_layout + bl(4) + &quot;///用途说明:\r\n&quot;;
m_layout = m_layout + bl(4) + &quot;///修改记录:\r\n&quot;;
m_layout = m_layout + bl(4) + &quot;///</comment>\r\n&quot;;

m_layout = m_layout + bl(4) + &quot;public class &quot; + tablename + &quot;s : system.collections.collectionbase\r\n&quot;;
m_layout = m_layout + bl(4) + &quot;{\r\n&quot;;

m_layout = m_layout + bl(8) + &quot;///<summary>\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;///构造函数\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;///<summary>\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;public &quot; + tablename + &quot;s()\r\n&quot;; //构造函数
m_layout = m_layout + bl(8) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;//todo:在这里增加构造函数逻辑\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;}\r\n\r\n&quot;;

m_layout = m_layout + bl(8) + &quot;///<summary>\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;///析构函数\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;///<summary>\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;~&quot; + tablename + &quot;s()\r\n&quot;; //析构函数
m_layout = m_layout + bl(8) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;//todo:在这里增加析构函数逻辑\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;}\r\n\r\n&quot;;

m_layout = m_layout + bl(8) + &quot;public void remove(int index)\r\n&quot;;  //删除
m_layout = m_layout + bl(8) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;if(index>counter-1counter<0)\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;{}\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;else\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(16) + &quot;list.removeat(index);\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;}\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;}\r\n\r\n&quot;;

m_layout = m_layout + bl(8) + &quot;public void add(&quot;+tablename+&quot; m_&quot;+tablename+&quot;)\r\n&quot;; //增加
m_layout = m_layout + bl(8) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;list.add(&quot;+&quot; m_&quot;+tablename+&quot;);\r\n&quot;;
m_layout = m_layout + bl(8) + &quot;}\r\n\r\n&quot;;

m_layout = m_layout + bl(8) + &quot;public &quot;+tablename+&quot; this[int index]\r\n&quot;; //集合的元素
m_layout = m_layout + bl(8) + &quot;{\r\n&quot;;

m_layout = m_layout + bl(12) + &quot;get\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(16) + &quot;if(index <list.count)\r\n&quot;;
m_layout = m_layout + bl(16) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(20) + &quot;return (&quot;+tablename+&quot;)list[index];\r\n&quot;;
m_layout = m_layout + bl(16) + &quot;}\r\n&quot;;
m_layout = m_layout + bl(16) + &quot;else\r\n&quot;;
m_layout = m_layout + bl(16) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(16) + &quot;return null;\r\n&quot;;
m_layout = m_layout + bl(16) + &quot;}\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;}\r\n&quot;;

m_layout = m_layout + bl(12) + &quot;set\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(16) + &quot;if(iindex<list.count)\r\n&quot;;
m_layout = m_layout + bl(16) + &quot;{\r\n&quot;;
m_layout = m_layout + bl(20) + &quot;list[index]=value;\r\n&quot;;
m_layout = m_layout + bl(16) + &quot;}\r\n&quot;;
m_layout = m_layout + bl(12) + &quot;}\r\n&quot;;

m_layout = m_layout + bl(8) + &quot;}\r\n&quot;;

m_layout = m_layout + bl(4) + &quot;}\r\n&quot;; //class

m_layout = m_layout + &quot;}\r\n&quot;; //namespace

this.txtlayout.text = m_layout;
}
}
#endregion

  


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons