コード例 #1
0
ファイル: Stats.cs プロジェクト: ntfnd404/Kliva
        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);
        }
コード例 #2
0
 public UserMeasurementUnitStatisticsDetail(UserMeasurementUnitMetric metric)
 {
     Metric = metric;
     Metric.PropertyChanged += OnMetricPropertyChanged;
     base.DisplayValue       = metric.FormattedValueWithUnit;
 }