Ejemplo n.º 1
0
        public ProgressObserver(ProgressSubject subject)
        {
            this.subject = subject;

            EventHandler handler = new EventHandler(UpdateProgress);

            subject.ProgressEvent += handler;
        }
Ejemplo n.º 2
0
        public ProgressObserver(ProgressSubject subject)
        {
            this.subject = subject;

            EventHandler handler = new EventHandler(UpdateProgress);

            subject.ProgressEvent += handler;
        }
Ejemplo n.º 3
0
        public Form1()
        {
            InitializeComponent();

            slowWorker = new ProgressSubject();

            new ProgressBarObserver(slowWorker, progressBar1);
            new SpinBoxObserver(slowWorker, numericUpDown1);
            new TrackBarObserver(slowWorker, trackBar1);
        }
Ejemplo n.º 4
0
        public Form1()
        {
            InitializeComponent();

            slowWorker = new ProgressSubject();

            new ProgressBarObserver(slowWorker, progressBar1);
            new SpinBoxObserver(slowWorker, numericUpDown1);
            new TrackBarObserver(slowWorker, trackBar1);
        }
Ejemplo n.º 5
0
 public TrackBarObserver(ProgressSubject subject, TrackBar inputTrackBar)
     : base(subject)
 {
     trackBar = inputTrackBar;
 }
Ejemplo n.º 6
0
 public SpinBoxObserver(ProgressSubject subject, NumericUpDown inputSpinBox)
     : base(subject)
 {
     spinBox = inputSpinBox;
 }
Ejemplo n.º 7
0
 public ProgressBarObserver(ProgressSubject subject, ProgressBar inputProgressBar)
     : base(subject)
 {
     progressBar = inputProgressBar;
 }
Ejemplo n.º 8
0
 public TrackBarObserver(ProgressSubject subject, TrackBar inputTrackBar)
     : base(subject)
 {
     trackBar = inputTrackBar;
 }
Ejemplo n.º 9
0
 public SpinBoxObserver(ProgressSubject subject, NumericUpDown inputSpinBox)
     : base(subject)
 {
     spinBox = inputSpinBox;
 }
Ejemplo n.º 10
0
 public ProgressBarObserver(ProgressSubject subject, ProgressBar inputProgressBar)
     : base(subject)
 {
     progressBar = inputProgressBar;
 }