Beispiel #1
0
        protected override void SettingChanged()
        {
            base.SettingChanged();
            if (_setting == null)
            {
                return;
            }
            NumberSelect numberSelect = (NumberSelect)_setting;

            switch (numberSelect.ValueType)
            {
            case NumberSelect.NumberType.FloatingPoint:
                _numberModel = new FloatingPointModel(numberSelect.Value, numberSelect.Step, numberSelect.MaxNumDigits);
                break;

            case NumberSelect.NumberType.Integer:
                _numberModel = new IntegerModel((int)numberSelect.Value, (int)numberSelect.Step);
                break;

            default:
                throw new InvalidDataException("NumberType '{0}' is not supported", numberSelect.ValueType);
            }
            GetLimits();
            Value         = _numberModel.ToString();
            DisplayLength = _numberModel.GetMaxNumCharacters();
        }
 protected override void SettingChanged()
 {
   base.SettingChanged();
   if (_setting == null)
     return;
   NumberSelect numberSelect = (NumberSelect) _setting;
   switch (numberSelect.ValueType)
   {
     case NumberSelect.NumberType.FloatingPoint:
       _numberModel = new FloatingPointModel(numberSelect.Value, numberSelect.Step, numberSelect.MaxNumDigits);
       break;
     case NumberSelect.NumberType.Integer:
       _numberModel = new IntegerModel((int) numberSelect.Value, (int) numberSelect.Step);
       break;
     default:
       throw new InvalidDataException("NumberType '{0}' is not supported", numberSelect.ValueType);
   }
   GetLimits();
   Value = _numberModel.ToString();
   DisplayLength = _numberModel.GetMaxNumCharacters();
 }