* UINumPadTextBox: 增加了最大值、最小值等属性
This commit is contained in:
parent
fdebecf3a9
commit
b5b1e8b5a4
@ -74,6 +74,14 @@ namespace Sunny.UI
|
|||||||
ControlBoxRect = new Rectangle(Width - 24, 0, 24, Height);
|
ControlBoxRect = new Rectangle(Width - 24, 0, 24, Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Description("开启后可响应某些触屏的点击事件"), Category("SunnyUI")]
|
||||||
|
[DefaultValue(false)]
|
||||||
|
public bool TouchPressClick
|
||||||
|
{
|
||||||
|
get => edit.TouchPressClick;
|
||||||
|
set => edit.TouchPressClick = value;
|
||||||
|
}
|
||||||
|
|
||||||
private UIButton tipsBtn;
|
private UIButton tipsBtn;
|
||||||
public void SetTipsText(ToolTip toolTip, string text)
|
public void SetTipsText(ToolTip toolTip, string text)
|
||||||
{
|
{
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
*
|
*
|
||||||
* 2023-03-18: V3.3.3 增加文件说明
|
* 2023-03-18: V3.3.3 增加文件说明
|
||||||
* 2023-03-26: V3.3.3 增加默认事件ValueChanged,下键盘Enter事件相应此事件
|
* 2023-03-26: V3.3.3 增加默认事件ValueChanged,下键盘Enter事件相应此事件
|
||||||
|
* 2023-03-26: V3.3.4 增加了最大值、最小值等属性
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@ -268,5 +269,35 @@ namespace Sunny.UI
|
|||||||
if (NumPadForm != null && NumPadForm.Visible)
|
if (NumPadForm != null && NumPadForm.Visible)
|
||||||
NumPadForm.Close();
|
NumPadForm.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当InputType为数字类型时,能输入的最大值
|
||||||
|
/// </summary>
|
||||||
|
[Description("当InputType为数字类型时,能输入的最大值。"), Category("SunnyUI")]
|
||||||
|
[DefaultValue(2147483647D)]
|
||||||
|
public double Maximum
|
||||||
|
{
|
||||||
|
get => edit.MaxValue;
|
||||||
|
set => edit.MaxValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当InputType为数字类型时,能输入的最小值
|
||||||
|
/// </summary>
|
||||||
|
[Description("当InputType为数字类型时,能输入的最小值。"), Category("SunnyUI")]
|
||||||
|
[DefaultValue(-2147483648D)]
|
||||||
|
public double Minimum
|
||||||
|
{
|
||||||
|
get => edit.MinValue;
|
||||||
|
set => edit.MinValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Description("浮点数,显示文字小数位数"), Category("SunnyUI")]
|
||||||
|
[DefaultValue(2)]
|
||||||
|
public int DecimalPlaces
|
||||||
|
{
|
||||||
|
get => edit.DecLength;
|
||||||
|
set => edit.DecLength = Math.Max(value, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user