Exemple #1
0
 private void Start_Click(object sender, EventArgs e)
 {
     int minutes = (int)numericUpDown1.Value;
     int secundes = (int)numericUpDown2.Value;
     countdownTimer = new CountdownTimer(new TimeSpan(0,0, minutes, secundes, 0));
     countdownTimer.Start(timer1);
     Text = "Start";
 }
Exemple #2
0
 // Listener unregister itself so that it no longer receives notifications
 public void Unregister(CountdownTimer timer)
 {
     timer.CountdownEvent -= Listen;
 }
Exemple #3
0
 // Pass the CountdownTimer object to the constructor
 public Listener(CountdownTimer timer)
 {
     timer.CountdownEvent += Listen;
 }