Esempio n. 1
0
        public void Run()
        {
            for (; seconds >= 0;)
            {
                Thread.Sleep(100);
                System.DateTime dt = System.DateTime.Now;
                if (dt.Second != nowSecond)
                {
                    Console.WriteLine("Now reading: {0} s", seconds);
                    seconds--;
                    nowSecond = dt.Second;
                }
            }

            CountDownEventArgs timsupEvent = new CountDownEventArgs(message);

            if (TimesUp != null)
            {
                TimesUp(this, timsupEvent);
            }
        }
Esempio n. 2
0
 public void toasterTimesUp(object CountDownClock, CountDownEventArgs cd)
 {
     Console.WriteLine("Notify: {0}", cd.ToString());
 }