* 修改部分控件小数位数属性名称为DecimalPlaces
This commit is contained in:
parent
79500d1797
commit
e63472dc5f
Binary file not shown.
Binary file not shown.
@ -123,9 +123,27 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DefaultValue(1)]
|
private int decLength = 1;
|
||||||
|
|
||||||
|
[DefaultValue(1), Browsable(false)]
|
||||||
[Description("小数位数"), Category("SunnyUI")]
|
[Description("小数位数"), Category("SunnyUI")]
|
||||||
public int Decimal { get; set; } = 1;
|
public int Decimal
|
||||||
|
{
|
||||||
|
get => decLength;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
decLength = Math.Max(value, 0);
|
||||||
|
pnlValue.Text = _value.ToString("F" + decLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Description("显示文字小数位数"), Category("SunnyUI")]
|
||||||
|
[DefaultValue(1)]
|
||||||
|
public int DecimalPlaces
|
||||||
|
{
|
||||||
|
get => Decimal;
|
||||||
|
set => Decimal = value;
|
||||||
|
}
|
||||||
|
|
||||||
private double step = 0.1;
|
private double step = 0.1;
|
||||||
|
|
||||||
|
@ -707,12 +707,21 @@ namespace Sunny.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("当InputType为数字类型时,小数位数。")]
|
[Description("当InputType为数字类型时,小数位数。")]
|
||||||
[DefaultValue(2), Category("SunnyUI")]
|
[DefaultValue(2), Category("SunnyUI")]
|
||||||
|
[Browsable(false)]
|
||||||
public int DecLength
|
public int DecLength
|
||||||
{
|
{
|
||||||
get => edit.DecLength;
|
get => edit.DecLength;
|
||||||
set => edit.DecLength = Math.Max(value, 0);
|
set => edit.DecLength = Math.Max(value, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Description("浮点数,显示文字小数位数"), Category("SunnyUI")]
|
||||||
|
[DefaultValue(2)]
|
||||||
|
public int DecimalPlaces
|
||||||
|
{
|
||||||
|
get => DecLength;
|
||||||
|
set => DecLength = value;
|
||||||
|
}
|
||||||
|
|
||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
[Description("整形或浮点输入时,是否可空显示"), Category("SunnyUI")]
|
[Description("整形或浮点输入时,是否可空显示"), Category("SunnyUI")]
|
||||||
public bool CanEmpty
|
public bool CanEmpty
|
||||||
|
Loading…
x
Reference in New Issue
Block a user