public Form1() { InitializeComponent(); // Create instance of subject first so that observers can subscribe subject = new ProgressSubject(); // Instantiate our observers once subject exists progressBarObserver = new ProgressBarObserver(subject, progressBar1); trackBarObserver = new TrackBarObserver(subject, trackBar1); upDownObserver = new UpDownObserver(subject, numericUpDown1, this); }
public Form1() { InitializeComponent(); // Create instance of subject first so that observers can subscribe subject = new ProgressSubject(); // Instantiate our observers once subject exists progressBarObserver = new ProgressBarObserver(subject, progressBar1); trackBarObserver = new TrackBarObserver(subject, trackBar1); upDownObserver = new UpDownObserver(subject, numericUpDown1, this); }