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); }
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); }