Exemplo n.º 1
0
        private void updateFirstAndAddLastEntry(double?lastEntryMinimum = null)
        {
            var values = _numericField.GetValues(_populationDataCollector);

            if (_fixedLimitDTOs.Count == 0)
            {
                _fixedLimitDTOs.Add(newDTO());
            }

            var firstDTO = _fixedLimitDTOs[0];

            firstDTO.CanDelete = false;
            firstDTO.Minimum   = _numericField.ValueInDisplayUnit(values.Min());

            double?minimumInDisplayUnit = null;

            if (lastEntryMinimum != null)
            {
                minimumInDisplayUnit = _numericField.ValueInDisplayUnit(lastEntryMinimum.Value);
            }

            //Last item
            _fixedLimitDTOs.Add(newDTO(canDelete: false, canAdd: false,
                                       maximumInDisplayUnit: _numericField.ValueInDisplayUnit(values.Max()),
                                       maximumEditable: false, minimumInDisplayUnit: minimumInDisplayUnit));
        }
Exemplo n.º 2
0
 private double convertedValue(PopulationAnalysisNumericField numericField, double valueInBaseUnit)
 {
     return(numericField.ValueInDisplayUnit(valueInBaseUnit));
 }