更新时间:2023-11-17 15:51:40
private System.Windows.Forms.Timer timer5mins;
private void FiveMin(){
timer5mins= new System.Windows.Forms.Timer();
timer5mins.Tick += new EventHandler(timer5mins_Tick);
timer5mins.Interval = 1000; // 1 second
timer5mins.Start();
}
private void timer5mins_Tick(object sender, EventArgs e)
{
//Call Webservice Method
//You can either ReCALL FiveMin Function Again to never stop
//Or
// Use timer5mins.Stop();
}