Cheng ren gush i:C#ren函数每10秒在Windows窗体

关于Cheng ren gush i的问题,在windows 10 seconds中经常遇到, 我有一个从路由器读取数据的软件。

我有一个从路由器读取数据的软件。

一切都在工作-但我必须按一个名为“刷新”的 buton,如果我想看到数据刷新...

这应该在后台工作后,我已经连接到设备。

我怎样才能自动做到这一点-每 10 秒?

我试过这个:Add timer to a Windows Forms application

看来我的代码不知道System.Windows.Forms.Timer类。

0
Use System.Windows.Forms.Timer class
private Timer timer1; 
public void InitTimer()
{
    timer1 = new Timer();
    timer1.Tick += new EventHandler(timer1_Tick);
    timer1.Interval = 10000; // 10 seconds / 10000 MillSecs
    timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
    isonline();
}

感谢Execute specified function every X seconds中的 Stecya

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(859)
C照增驾d照怎么考:用网络摄像头统一拍照 但不能附加脚本
上一篇
E pac:Fretecorreioserronopacenosedex
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(61条)