嗨我已经陷入了一些与计时器相关的问题.希望有人可以帮忙..
Thread thread1 = new Thread(new ParameterizedThreadStart( execute2));
thread1.Start(externalFileParams);
Run Code Online (Sandbox Code Playgroud)
.
public void execute2(Object ob)
{
if (ob is ExternalFileParams)
{
if (boolean_variable== true)
executeMyMethod();//this also executes very well if condition is true
else
{
timer1.enabled = true;
timer1.start();
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
5但是没有触发计时器的tick事件
我正在研究VS2008 3.5框架.我已经从工具箱拖动计时器并将其设置Interval为300也试图设置Enabledtrue/false方法timer1_Tick(Object sender , EventArgs e)但是它没有被解雇
任何人都可以建议我做错了什么?