//constructor sets default subject and output public WeatherDisplay(IWeatherSubject subject, ListBox output) { this.output = output; //adds observer to monitor subject.AddObserver(this); //sets values to 0 currentHumidity = 0; currentPressure = 0; currentTemp = 0; }
public WeatherMonitoringObserver(ListBox displayListBox, IWeatherSubject weatherSubject) { this.displayListBox = displayListBox; currtemp = 0; currhumidity = 0; currbaroPressure = 0; currcomputedtemp = 0; currcomputedhumidity = 0; currcomputedbaroPressure = 0; weatherSubject.addWeatherObserver(this); }
public ForecastDisplay(IWeatherSubject ws) { this._weatherData = ws; this._weatherData.Register(this); }
public CurrentConditionsDisplay(IWeatherSubject ws) { this._weatherData = ws; this._weatherData.Register(this); }
public CurrentConditionsDisplay(IWeatherSubject weatherData) { this.weatherData = weatherData; weatherData.RegisterObserver(this); }
public HeatIndexDisplay(IWeatherSubject weatherSubject) { weatherSubject.RegisterObserver(this); }
public CurrentConditionDisplay(IWeatherSubject weatherSubject) { _weatherSubject = weatherSubject; weatherSubject.RegisterObserver(this); }
public DisplayForecast(IWeatherSubject subject, ListBox output) : base(subject, output) { }
public DisplayAverage(IWeatherSubject subject, ListBox output) : base(subject, output) { }
public DisplayTemperature(IWeatherSubject subject, ListBox output) : base(subject, output) { }
public StatisticsDisplay(IWeatherSubject ws) { this._weatherData = ws; this._weatherData.Register(this); }
public ForecastDisplay(IWeatherSubject weatherSubject) { weatherSubject.RegisterObserver(this); }
public WeatherObserver(IWeatherSubject weatherSubject) { measurements = new Measurements(); weatherSubject.AddObserver(this); }