
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
	<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head><card id="MainCard" title="&#x6B22;&#x8FCE;&#x5149;&#x4E34;"><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a><br/>&nbsp;</p><p><b>&#x6807;&#x9898;&#x3A;</b> &#x57;&#x69;&#x6E;&#x64;&#x6F;&#x77;&#x73;&#x670D;&#x52A1;&#x4E2D;&#x54;&#x69;&#x6D;&#x65;&#x72;&#x7EC4;&#x4EF6;&#x54;&#x69;&#x63;&#x6B;&#x65E0;&#x6CD5;&#x89E6;&#x53D1;&#x89E3;&#x51B3;&#x65B9;&#x6CD5;</p><p><b>&#x4F5C;&#x8005;&#x3A;</b> &#x64;&#x6E;&#x61;&#x77;&#x6F;</p><p><b>&#x65E5;&#x671F;&#x3A;</b> &#x32;&#x30;&#x30;&#x38;&#x2D;&#x30;&#x39;&#x2D;&#x30;&#x36;&#x20;&#x30;&#x30;&#x3A;&#x34;&#x36;&#x20;&#x41;&#x4D;</p><p><b>&#x5206;&#x7C7B;&#x3A;</b> <a href="wap.asp?do=showLog&amp;cateID=9">&#x7F51;&#x7EDC;&#x6280;&#x672F;</a></p><p><b>&#x5185;&#x5BB9;&#x3A;</b> &#x5177;&#x4F53;&#x539F;&#x56E0;&#xFF0C;&#x5FAE;&#x8F6F;&#x81EA;&#x79F0;&#x662F;Framework&#x7684;bug&#xFF0C;&#x4F46;&#x662F;&#x65E0;&#x8BBA;&#x662F;windows&#x7A97;&#x4F53;&#x4E2D;timer&#x8FD8;&#x662F;&#x7EC4;&#x4EF6;&#x4E2D;&#x7684;timer&#x90FD;&#x662F;&#x7EE7;&#x627F;&#x81EA;System.Windows.Form.Timer&#xFF0C;&#x5E76;&#x4E0D;&#x662F;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x7684;System.Timers&#xFF0C;&#x4E0B;&#x8FB9;&#x4F8B;&#x5B50;&#x4E2D;&#x6211;&#x4EEC;&#x6765;&#x624B;&#x5DE5;&#x521B;&#x5EFA;&#x7EE7;&#x627F;&#x81EA;System.Timers &#x7684;timer&#xFF1A;<br/>&#x590D;&#x5236;&#x5185;&#x5BB9;&#x5230;&#x526A;&#x8D34;&#x677F; &#x7A0B;&#x5E8F;&#x4EE3;&#x7801;public Service1()<br/>{<br/>&nbsp;&nbsp;&nbsp;&nbsp;InitializeComponent();<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;System.Timers.Timer t = new System.Timers.Timer(200);//&#x5B9E;&#x4F8B;&#x5316;Timer&#x7C7B;&#xFF0C;&#x8BBE;&#x7F6E;&#x95F4;&#x9694;&#x65F6;&#x95F4;&#x4E3A;10000&#x6BEB;&#x79D2;&#xFF1B; <br/>&nbsp;&nbsp;&nbsp;&nbsp;t.Elapsed += new System.Timers.ElapsedEventHandler(theout);//&#x5230;&#x8FBE;&#x65F6;&#x95F4;&#x7684;&#x65F6;&#x5019;&#x6267;&#x884C;&#x4E8B;&#x4EF6;&#xFF1B; <br/>&nbsp;&nbsp;&nbsp;&nbsp;t.AutoReset = true;//&#x8BBE;&#x7F6E;&#x662F;&#x6267;&#x884C;&#x4E00;&#x6B21;&#xFF08;false&#xFF09;&#x8FD8;&#x662F;&#x4E00;&#x76F4;&#x6267;&#x884C;(true)&#xFF1B; <br/>&nbsp;&nbsp;&nbsp;&nbsp;t.Enabled = true;//&#x662F;&#x5426;&#x6267;&#x884C;System.Timers.Timer.Elapsed&#x4E8B;&#x4EF6;&#xFF1B; <br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>}<br/>public void theout(object source, System.Timers.ElapsedEventArgs e)<br/>{<br/>&nbsp;&nbsp;&nbsp;&nbsp;SqlConnection conn = new SqlConnection(&#34;Server=.;UID=eaglesoft;PWD=password;DataBase=exchange&#34;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;SqlCommand comm = new SqlCommand(&#34;Ins&#101;rt INTO op_album(album_name,album_score,album_picscr) VALUES(&#39;1&#39;,&#39;2&#39;,&#39;3&#39;)&#34;, conn);<br/>&nbsp;&nbsp;&nbsp;&nbsp;conn.Open();<br/>&nbsp;&nbsp;&nbsp;&nbsp;comm.ExecuteNonQuery();<br/>&nbsp;&nbsp;&nbsp;&nbsp;conn.Close();<br/>}<br/>&#x8FD9;&#x6837;&#x5C31;&#x53EF;&#x4EE5;&#x89E6;&#x53D1;Elapsed&#x4E8B;&#x4EF6;&#x4E86;&#xFF0C;&#x6CE8;&#x518C;&#x670D;&#x52A1;&#x4E00;&#x5207;&#x6B63;&#x5E38;&#x3002;<br/>&#x9644;&#xFF1A;Visual Studio &#x4E2D;3&#x79CD;&#x8BA1;&#x65F6;&#x5668;&#x8BF4;&#x660E;<br/>System.Windows.Forms.Timer&#xFF1A;&#x57FA;&#x4E8E;windows &#x7684;&#x8BA1;&#x65F6;&#x5668;&#xFF0C;&#x8FD0;&#x884C;&#x4E8E;Windows &#x7A97;&#x4F53;&#x7A0B;&#x5E8F;&#x4E2D;&#x3002;<br/>System.Timers.Timer&#xFF1A;&#x57FA;&#x4E8E;&#x670D;&#x52A1;&#x7684;&#x8BA1;&#x65F6;&#x5668;&#xFF0C;&#x8FD0;&#x884C;&#x4E8E;&#x670D;&#x52A1;&#x5668;&#x73AF;&#x5883;&#x4E2D;&#x3002;<br/>System.Threading.Timer&#xFF1A;&#x57FA;&#x4E8E;&#x7EBF;&#x7A0B;&#x7684;&#x8BA1;&#x65F6;&#x5668;&#xFF0C;&#x4F7F;&#x7528;&#x56DE;&#x8C03;&#x65B9;&#x6CD5;&#x800C;&#x4E0D;&#x662F;&#x4F7F;&#x7528;&#x4E8B;&#x4EF6;&#xFF0C;&#x5E76;&#x7531;&#x7EBF;&#x7A0B;&#x6C60;&#x7EBF;&#x7A0B;&#x63D0;&#x4F9B;&#x652F;&#x6301;&#x3002;</p><p> + <a href="#CommentCard">&#x67E5;&#x770B;&#x5F53;&#x524D;&#x65E5;&#x5FD7;&#x8BC4;&#x8BBA;</a> (0)</p><p>&nbsp;<br/><br/><a href="wap.asp?do=Login">&#x767B;&#x5F55;</a></p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.031&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card><card id="postCommentCard"><p><b>&#x6807;&#x9898;&#x3A;</b> <a href="#MainCard">&#x57;&#x69;&#x6E;&#x64;&#x6F;&#x77;&#x73;&#x670D;&#x52A1;&#x4E2D;&#x54;&#x69;&#x6D;&#x65;&#x72;&#x7EC4;&#x4EF6;&#x54;&#x69;&#x63;&#x6B;&#x65E0;&#x6CD5;&#x89E6;&#x53D1;&#x89E3;&#x51B3;&#x65B9;&#x6CD5;</a></p><p><br/>你没有权限发表评论</p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.031&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card><card id="CommentCard"><p>&#x6682;&#x65E0;&#x8BC4;&#x8BBA;</p><p><a href="#MainCard">&#x8FD4;&#x56DE;</a></p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.031&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card>
</wml>
