public void SetUserMeasurementUnits(DistanceUnitType measurementUnit) { MeasurementUnit = measurementUnit; bool isMetric = MeasurementHelper.IsMetric(MeasurementUnit); var elevationDistanceUnitType = MeasurementHelper.GetElevationUnitType(isMetric); var distanceUnitType = MeasurementHelper.GetDistanceUnitType(isMetric); TotalDistanceUserMeasurementUnit = new UserMeasurementUnitMetric((float)Distance, DistanceUnitType.Metres, distanceUnitType); ElevationGainUserMeasurementUnit = new UserMeasurementUnitMetric((float)ElevationGain, DistanceUnitType.Metres, elevationDistanceUnitType); }
public UserMeasurementUnitStatisticsDetail(UserMeasurementUnitMetric metric) { Metric = metric; Metric.PropertyChanged += OnMetricPropertyChanged; base.DisplayValue = metric.FormattedValueWithUnit; }