Lots of work on Array tool and support property editors
This commit is contained in:
parent
5675973207
commit
2cd09dd365
12 changed files with 503 additions and 61 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue