Esempio n. 1
0
        public Observer(Subject subject, Control c)
        {
            this.subject = subject;
            this.c = c;

            subject.UpdateEvent += new EventHandler(MakeProgress);
        }
Esempio n. 2
0
 public Form1()
 {
     InitializeComponent();
     subject = new Subject();
     udo = new UpDownObserver(subject, numericUpDown1);
     pbo = new ProgressBarObserver(subject, progressBar1);
     tbo = new TrackBarObserver(subject, trackBar1);
 }
Esempio n. 3
0
 public TrackBarObserver(Subject subject, Control c)
     : base(subject, c)
 {
     t = (TrackBar)c;
 }
Esempio n. 4
0
 public UpDownObserver(Subject subject, Control c)
     : base(subject, c)
 {
     n = (NumericUpDown)c;
 }
 public ProgressBarObserver(Subject subject, Control c)
     : base(subject, c)
 {
     p = (ProgressBar)c;
 }