Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }