예제 #1
0
 public Form1()
 {
     InitializeComponent();
     fireSubject = new FireAlarmSubject();
     instObserver = new InstructionsObserver(fireSubject);
     almObserver = new AlarmObserver(fireSubject);
 }
예제 #2
0
        public FireAlarmObserver(FireAlarmSubject fireSubject)
        {
            this.fireSubject = fireSubject;

            FireAlarmSubject.FireEventHandler handler = new FireAlarmSubject.FireEventHandler(FireAlarmHandlerMethod);
            fireSubject.FireEvent += handler;
        }
예제 #3
0
 public AlarmObserver(FireAlarmSubject fireSubject)
     : base(fireSubject)
 {
 }
예제 #4
0
 public InstructionsObserver(FireAlarmSubject fireSubject)
     : base(fireSubject)
 {
 }