public void Update(object sender, WheatherDataEventArgs args) { var wheatherData = args.CurrentWheatherData; HeatIndex = 16.92f + 1.85f * wheatherData.Temperature + 5.38f * wheatherData.Humidity - wheatherData.Temperature * wheatherData.Humidity; Display(); }
public void Update(object sender, WheatherDataEventArgs args) { var wheatherData = args.CurrentWheatherData; 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(); }
public void Update(object sender, WheatherDataEventArgs args) { CurrentWheatherData = args.CurrentWheatherData; Display(); }