定时器的写法 winform

private void timer1_Tick(object sender, EventArgs e)
{

if ( tttttflag)
{
Action action = SyncCompanyJJ;
action.BeginInvoke(null, null);
}

}

tttttflag 方法体内 对该字段进行锁定  开始时候为false 完成时为for 

原文地址:https://www.cnblogs.com/muxueyuan/p/7390812.html