U
Ulaş Kayalar
Guest
public Form1()
{
InitializeComponent();
timer1 = new System.Timers.Timer();
timer1.Interval = 1;
timer1.Elapsed += new ElapsedEventHandler(OnTimedEvent);
timer1.Enabled = true;
timer1.AutoReset = true;
}
private void OnTimedEvent(object source, ElapsedEventArgs e)
{
if(blablabla){
//code
}else{
timer1.Dispose();
timer1.Enabled=false;
}
}
Not working, please help.
In the example I showed system.timers, the winform timer does not even stop.
Continue reading...
{
InitializeComponent();
timer1 = new System.Timers.Timer();
timer1.Interval = 1;
timer1.Elapsed += new ElapsedEventHandler(OnTimedEvent);
timer1.Enabled = true;
timer1.AutoReset = true;
}
private void OnTimedEvent(object source, ElapsedEventArgs e)
{
if(blablabla){
//code
}else{
timer1.Dispose();
timer1.Enabled=false;
}
}
Not working, please help.
In the example I showed system.timers, the winform timer does not even stop.
Continue reading...