Esempio n. 1
0
 private void button1_Click(object sender, System.EventArgs e)
 {
     tcp           = new TCP();
     serve_sendata = tcp.TCPserve();
     System.Timers.Timer timer = new System.Timers.Timer();
     timer.Enabled  = true;
     timer.Interval = 30;//执行间隔时间,单位为毫秒;此时时间间隔为30ms
     timer.Start();
     timer.Elapsed += new System.Timers.ElapsedEventHandler(serve_test);
 }
Esempio n. 2
0
 private void button1_Click(object sender, System.EventArgs e)
 {
     tcp     = new TCP();
     sendata = tcp.TCPserve();
 }