示例#1
0
        public Form1()
        {
            InitializeComponent();

            subject = new FireAlarmSubject();

            //sets observers to subject (beep first then message)
            FireAlarmBeep beepEvent = new FireAlarmBeep(subject);
            FireAlarmMessage messageEvent = new FireAlarmMessage(subject);
        }
示例#2
0
        public Form1()
        {
            InitializeComponent();

            subject = new FireAlarmSubject();

            //sets observers to subject (beep first then message)
            FireAlarmBeep    beepEvent    = new FireAlarmBeep(subject);
            FireAlarmMessage messageEvent = new FireAlarmMessage(subject);
        }