Esempio n. 1
0
 public Form1()
 {
     InitializeComponent();
     bikeWorker = new SubjectBicycle();
     rpmDisplay = new RPMObserver(bikeWorker, lbRPM);
     calDisplay = new CalPerHourObserver(bikeWorker, lbCal);
     kmhDisplay = new KMHObserver(bikeWorker, lbkmsh);
 }
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();

            subject = new RPMSubject();
            rpm     = new RPMObserver(lb_RPM_Display, subject);
            calorie = new CalorieCalculatorObserver(lb_CaloriesDisplay, subject);
            speed   = new SpeedObserver(lb_kmsPerHourDisplay, subject);
        }
Esempio n. 3
0
        public Form1()
        {
            InitializeComponent();

            subject = new RPMSubject();
            rpm = new RPMObserver(lb_RPM_Display, subject);
            calorie = new CalorieCalculatorObserver(lb_CaloriesDisplay, subject);
            speed = new SpeedObserver(lb_kmsPerHourDisplay, subject);
        }