예제 #1
0
        public void Update(IWheatherData wheatherData)
        {
            MaxTemperature = Math.Max(MaxTemperature, wheatherData.Temperature);
            MinTemperature = Math.Min(MinTemperature, wheatherData.Temperature);
            MaxHumidity    = Math.Max(MaxHumidity, wheatherData.Humidity);
            MinHumidity    = Math.Min(MinHumidity, wheatherData.Humidity);
            MaxPressure    = Math.Max(MaxPressure, wheatherData.Pressure);
            MinPressure    = Math.Min(MinPressure, wheatherData.Pressure);

            Display();
        }
예제 #2
0
 public void Update(IWheatherData wheatherData)
 {
     CurrentWheatherData = wheatherData;
     Display();
 }
예제 #3
0
 public WheatherDataEventArgs(IWheatherData newWheatherData)
 {
     CurrentWheatherData = newWheatherData;
 }
예제 #4
0
 public void Update(IWheatherData wheatherData)
 {
     HeatIndex = 16.92f + 1.85f * wheatherData.Temperature + 5.38f * wheatherData.Humidity -
                 wheatherData.Temperature * wheatherData.Humidity;
     Display();
 }