Exemple #1
0
 public void MeasurementUnitChanged(CurrentMeasurementUnit newMeasurementUnit)
 {
     _currenTemperatureUnit         = newMeasurementUnit.Temperature;
     _currentBarometricPressureUnit = newMeasurementUnit.BarometricPressure;
     TemperatureLabel        = _currenTemperatureUnit == TemperatureUnit.Celsius ? "°C" : "°F";
     BarometricPressureLabel = _currentBarometricPressureUnit == BarometricPressureUnit.MBar ? "mBar" : "inHg";
 }
Exemple #2
0
 public UnitSettingsWindowViewModel()
 {
     _temperatureUnit        = (TemperatureUnit)Settings.Default.TemperatureUnit;
     _barometricPressureUnit = (BarometricPressureUnit)Settings.Default.BarometricPressureUnit;
 }