예제 #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)
 {
 }