public Form1() { InitializeComponent(); //Instantiate objects fas = new FireAlarmSubject(); io = new InstructionsObserver(fas); }
public Form1() { InitializeComponent(); rbMinor.Checked = true; fireAlarmSubject = new FireAlarmSubject(); instructionsObserver = new InstructionsObserver(fireAlarmSubject); beepObserver = new BeepObserver(fireAlarmSubject); }
public Form1() { InitializeComponent(); subject = new FireAlarmSubject(); io = new InstructionsObserver(subject); bo = new BellObserver(subject); }
public Form1() { InitializeComponent(); //Create subject FireAlarm = new FireAlarmSubject(); //Create observer(s) InstructionsObserver observer1 = new InstructionsObserver(FireAlarm); BeepObserver observer2 = new BeepObserver(FireAlarm); }
private void Form1_Load(object sender, EventArgs e) { subjectWithEvent = new FireAlarmSubject(); beep = new BeepObserver(subjectWithEvent); instruction = new InstructionsObserver(subjectWithEvent); }