// TODO(jkern): integrate this with new SpinnerProperties etc. public Spinner(Root root, string id, SpinnerProperties properties, Unit[] validUnits) : base(root, id, properties) { AddDisplayMode("Medium"); _accIterations = 0; _multiplier = 1; _validUnits = validUnits; _value = Double.Parse(Properties.DefaultValue); StateProperties[SpinnerCommandProperties.Value] = _value.ToString(); _currentUnit = FindUnitByNameOrAbbreviation(Properties.DefaultUnit); if (CUIUtility.IsNullOrUndefined(_currentUnit)) throw new ArgumentOutOfRangeException("The default unit is not in the list of valid units"); StateProperties[SpinnerCommandProperties.Unit] = _currentUnit.Name; }
// TODO(jkern): integrate this with new SpinnerProperties etc. public Spinner(Root root, string id, SpinnerProperties properties, Unit[] validUnits) : base(root, id, properties) { AddDisplayMode("Medium"); _accIterations = 0; _multiplier = 1; _validUnits = validUnits; _value = Double.Parse(Properties.DefaultValue); StateProperties[SpinnerCommandProperties.Value] = _value.ToString(); _currentUnit = FindUnitByNameOrAbbreviation(Properties.DefaultUnit); if (CUIUtility.IsNullOrUndefined(_currentUnit)) { throw new ArgumentOutOfRangeException("The default unit is not in the list of valid units"); } StateProperties[SpinnerCommandProperties.Unit] = _currentUnit.Name; }