Beispiel #1
0
 public void Update(ISubject weatherData, Object obj)
 {
     if (weatherData is WeatherData)
     {
         WeatherData data = weatherData as WeatherData;
         this.pressure = data.GetPressure();
         Display();
     }
 }
 public void Update(ISubject weatherData, Object obj)
 {
     if (weatherData is WeatherData)
     {
         WeatherData data = weatherData as WeatherData;
         this.temp     = data.GetTemperature();
         this.humidity = data.GetHumidity();
         this.pressure = data.GetPressure();
         Display();
     }
 }