예제 #1
0
        public void Run()
        {
            CountdownAlarm alarm = new CountdownAlarm();

            alarm.SecondsToWaitRequest();
            alarm.MessageRequest();

            DisplayAlarm displayAlarm = new DisplayAlarm();

            displayAlarm.Subscribe(alarm);

            alarm.Run();
        }
예제 #2
0
 public void Subscribe(CountdownAlarm alarm)
 {
     alarm.TimePassed += Alarm_TimePassed;
 }