예제 #1
0
 public Form1()
 {
     InitializeComponent();
     subject  = new FireAlarmSubject();
     beep     = new BeepObserver(subject);
     instruct = new InstructionsObserver(subject);
 }
 public FireAlarmObserverBase(FireAlarmSubject subject)
 {
     this.subject = subject;
     FireAlarmSubject.FireEventHandler handler = new FireAlarmSubject.FireEventHandler(FireAlarmHandlerMethod);
     subject.FireEvent += handler;
 }
 public BeepObserver(FireAlarmSubject subject)
     : base(subject)
 {
 }
예제 #4
0
 public InstructionsObserver(FireAlarmSubject subject)
     : base(subject)
 {
 }