Esempio n. 1
0
 public Form1()
 {
     InitializeComponent();
     rbMinor.Checked      = true;
     fireAlarmSubject     = new FireAlarmSubject();
     instructionsObserver = new InstructionsObserver(fireAlarmSubject);
     beepObserver         = new BeepObserver(fireAlarmSubject);
 }
Esempio n. 2
0
 public Form1()
 {
     InitializeComponent();
     rbMinor.Checked = true;
     fireAlarmSubject = new FireAlarmSubject();
     instructionsObserver = new InstructionsObserver(fireAlarmSubject);
     beepObserver = new BeepObserver(fireAlarmSubject);
 }
        public Form1()
        {
            InitializeComponent();

            // Instantiate them
            subject = new FireAlarmSubject();
            obI     = new InstructionObserver(subject);
            obB     = new BeepObserver(subject);
        }
Esempio n. 4
0
        public Form1()
        {
            InitializeComponent();
            //Create subject
            FireAlarm = new FireAlarmSubject();

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