Exemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();
            bikeMonitor = new SubjectSpeedMonitor();

            rpmDisplay      = new ObserverRPMDisplay(bikeMonitor, labelCurrentRPM);
            velocityDisplay = new ObserverVelocityDisplay(bikeMonitor, labelCurrentVelocity);
            calorieDisplay  = new ObserverCalorieDisplay(bikeMonitor, labelCurrentCalories);
        }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            bikeMonitor = new SubjectSpeedMonitor();

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