예제 #1
0
        public Form1()
        {
            InitializeComponent();

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

            subject = new FireAlarmSubject();
            io = new InstructionsObserver(subject);
            bo = new BellObserver(subject);
        }
예제 #5
0
        public Form1()
        {
            InitializeComponent();
            //Create subject
            FireAlarm = new FireAlarmSubject();

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