示例#1
0
        public void Run()
        {
            CountDownClock toasterCountDown = new CountDownClock("Toaster ready to eat", 5);
            ToasterNotify  note             = new ToasterNotify();

            note.subscribe(toasterCountDown);
            toasterCountDown.Run();
        }
示例#2
0
 public void subscribe(CountDownClock theClock)
 {
     theClock.TimesUp += new CountDownClock.CountDownHandler(toasterTimesUp);
 }