Ejemplo n.º 1
0
 public void OnTick(TimerEventArgs e)
 {
     if (this.Tick != null)
     {
         this.Tick(this, e);
     }
 }
Ejemplo n.º 2
0
 public void Start(int iterations)
 {
     while (iterations > 0)
     {
         TimerEventArgs arg = new TimerEventArgs(iterations);
         this.OnTick(arg);
         Thread.Sleep(this.interval);
         iterations--;
     }
 }
Ejemplo n.º 3
0
 private void Timer_Tick(object sender, TimerEventArgs e)
 {
     Console.WriteLine("{0} said: \"Just {1} more times\"", this.name, e.Ticks);
 }