public SubjectObserverManager(ListBox listBoxTemp, ListBox listBoxAvg, ListBox listBoxForecast) { weatherSubject = new WeatherSubject(); temperatureObserver = new TemperatureObserver(listBoxTemp, weatherSubject); averageReadingsObserver = new AverageReadingsObserver(listBoxAvg, weatherSubject); forecastObserver = new ForecastObserver(listBoxForecast, weatherSubject); }
public WeatherObserver(ListBox listBox, WeatherSubject weatherSubject) { this.listBox = listBox; dataDictionary = new Dictionary<String, double>(); weatherSubject.AddObserver(this); computedDataDictionary = new Dictionary<String, double>(); }
int WeatherVariableAmount; //The amount of fields being read by the form - Could add a class to hold that data #endregion Fields #region Constructors public AverageReadingsObserver(ListBox listBox, WeatherSubject weatherSubject) : base(listBox, weatherSubject) { this.listBox = listBox; this.weatherSubject = weatherSubject; savedValues = new List<double>(); dataTypeList = new List<String>(); UpdateAmount = 0; WeatherVariableAmount = 0; }
public ForecastObserver(ListBox listBox, WeatherSubject weatherSubject) : base(listBox, weatherSubject) { this.listBox = listBox; this.weatherSubject = weatherSubject; temp = 0; pressure = 0; tempString = ""; pressureString = ""; }
public TemperatureObserver(ListBox listBox, WeatherSubject weatherSubject) : base(listBox, weatherSubject) { this.listBox = listBox; this.weatherSubject = weatherSubject; }