Example #1
0
        public Form1()
        {
            InitializeComponent();
            bikeMonitor = new SubjectSpeedMonitor();

            rpmDisplay      = new ObserverRPMDisplay(bikeMonitor, labelCurrentRPM);
            velocityDisplay = new ObserverVelocityDisplay(bikeMonitor, labelCurrentVelocity);
            calorieDisplay  = new ObserverCalorieDisplay(bikeMonitor, labelCurrentCalories);
        }
        public Form1()
        {
            InitializeComponent();
            bikeMonitor = new SubjectSpeedMonitor();

            rpmDisplay = new ObserverRPMDisplay(bikeMonitor, labelCurrentRPM);
            velocityDisplay = new ObserverVelocityDisplay(bikeMonitor, labelCurrentVelocity);
            calorieDisplay = new ObserverCalorieDisplay(bikeMonitor, labelCurrentCalories);
        }