Esempio n. 1
0
        public Form1()
        {
            InitializeComponent();

            //Instantiate objects
            fas = new FireAlarmSubject();
            io = new InstructionsObserver(fas);
        }
Esempio n. 2
0
 public Form1()
 {
     InitializeComponent();
     rbMinor.Checked      = true;
     fireAlarmSubject     = new FireAlarmSubject();
     instructionsObserver = new InstructionsObserver(fireAlarmSubject);
     beepObserver         = new BeepObserver(fireAlarmSubject);
 }
Esempio n. 3
0
 public Form1()
 {
     InitializeComponent();
     rbMinor.Checked = true;
     fireAlarmSubject = new FireAlarmSubject();
     instructionsObserver = new InstructionsObserver(fireAlarmSubject);
     beepObserver = new BeepObserver(fireAlarmSubject);
 }
Esempio n. 4
0
        public Form1()
        {
            InitializeComponent();

            subject = new FireAlarmSubject();
            io = new InstructionsObserver(subject);
            bo = new BellObserver(subject);
        }
Esempio n. 5
0
        public Form1()
        {
            InitializeComponent();
            //Create subject
            FireAlarm = new FireAlarmSubject();

            //Create observer(s)
            InstructionsObserver observer1 = new InstructionsObserver(FireAlarm);
            BeepObserver observer2 = new BeepObserver(FireAlarm);
        }
Esempio n. 6
0
 private void Form1_Load(object sender, EventArgs e)
 {
     subjectWithEvent = new FireAlarmSubject();
     beep             = new BeepObserver(subjectWithEvent);
     instruction      = new InstructionsObserver(subjectWithEvent);
 }