Lots of work on Array tool and support property editors

This commit is contained in:
Lars Brubaker 2018-02-09 18:10:41 -08:00 committed by LarsBrubaker
parent 5675973207
commit 2cd09dd365
12 changed files with 503 additions and 61 deletions

View file

@ -35,19 +35,31 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
{
public class DoubleField : NumberField
{
protected double doubleValue;
double _doubleValue;
public double DoubleValue
{
get { return _doubleValue; }
set
{
if (_doubleValue != value)
{
_doubleValue = value;
numberEdit.Value = _doubleValue;
}
}
}
protected override string ConvertValue(string newValue)
{
double.TryParse(newValue, out double currentValue);
doubleValue = currentValue;
DoubleValue = currentValue;
return doubleValue.ToString();
return DoubleValue.ToString();
}
protected override void OnValueChanged(FieldChangedEventArgs fieldChangedEventArgs)
{
numberEdit.ActuallNumberEdit.Value = doubleValue;
numberEdit.ActuallNumberEdit.Value = DoubleValue;
base.OnValueChanged(fieldChangedEventArgs);
}
}