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) { }
public InstructionsObserver(FireAlarmSubject subject) : base(subject) { }