Esempio n. 1
0
        public Form1()
        {
            InitializeComponent();

            //creates subject and observers and sets their listboxes
            weatherSubject      = new WeatherMonitor();
            averageObserver     = new DisplayAverage(weatherSubject, listBoxAverage);
            forecastObserver    = new DisplayForecast(weatherSubject, listBoxForecast);
            temperatureObserver = new DisplayTemperature(weatherSubject, listBoxTemp);
        }
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();

            //creates subject and observers and sets their listboxes
            weatherSubject = new WeatherMonitor();
            averageObserver = new DisplayAverage(weatherSubject, listBoxAverage);
            forecastObserver = new DisplayForecast(weatherSubject, listBoxForecast);
            temperatureObserver = new DisplayTemperature(weatherSubject, listBoxTemp);
        }