Пример #1
0
        public Form1()
        {
            InitializeComponent();

            bicycleSubject = new BicycleSubject(0);
            rpmObserver = new RPMObserver(lbDisplayRPM, bicycleSubject);
            kphObserver = new KPHObserver(lbKPH, bicycleSubject);
            cphObserver = new CPHObserver(lbCalPerHour, bicycleSubject);
        }
Пример #2
0
        public Form1()
        {
            InitializeComponent();

            bicycleSubject = new BicycleSubject(0);
            rpmObserver = new RPMObserver(lbDisplayRPM, bicycleSubject);
            kphObserver = new KPHObserver(lbKPH, bicycleSubject);
            cphObserver = new CPHObserver(lbCalPerHour, bicycleSubject);
        }
Пример #3
0
        public BicycleObserver(Label displayLabel, BicycleSubject bicycleSubject)
        {
            this.displaylabel = displayLabel;
            currentRPM = 0;
            this.bicycleSubject = bicycleSubject;
            currentValue = 0;

            bicycleSubject.AddObserver(this);
        }
Пример #4
0
        public BicycleObserver(Label displayLabel, BicycleSubject bicycleSubject)
        {
            this.displaylabel   = displayLabel;
            currentRPM          = 0;
            this.bicycleSubject = bicycleSubject;
            currentValue        = 0;

            bicycleSubject.AddObserver(this);
        }
Пример #5
0
 public RPMObserver(Label displayLabel, BicycleSubject bicycleSubject)
     : base(displayLabel, bicycleSubject)
 {
 }
Пример #6
0
 public KPHObserver(Label displayLabel, BicycleSubject bicycleSubject)
     : base(displayLabel, bicycleSubject)
 {
 }