public Form1() { InitializeComponent(); fireSubject = new FireAlarmSubject(); instObserver = new InstructionsObserver(fireSubject); almObserver = new AlarmObserver(fireSubject); }
public FireAlarmObserver(FireAlarmSubject fireSubject) { this.fireSubject = fireSubject; FireAlarmSubject.FireEventHandler handler = new FireAlarmSubject.FireEventHandler(FireAlarmHandlerMethod); fireSubject.FireEvent += handler; }
public AlarmObserver(FireAlarmSubject fireSubject) : base(fireSubject) { }
public InstructionsObserver(FireAlarmSubject fireSubject) : base(fireSubject) { }