Пример #1
0
 public Form1()
 {
     InitializeComponent();
     bikeWorker = new SubjectBicycle();
     rpmDisplay = new RPMObserver(bikeWorker, lbRPM);
     calDisplay = new CalPerHourObserver(bikeWorker, lbCal);
     kmhDisplay = new KMHObserver(bikeWorker, lbkmsh);
 }
Пример #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);
        }
Пример #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);
        }