diff --git a/SunnyUI/Controls/DropItem/UIDropControl.cs b/SunnyUI/Controls/DropItem/UIDropControl.cs index 519fd20f..92f81085 100644 --- a/SunnyUI/Controls/DropItem/UIDropControl.cs +++ b/SunnyUI/Controls/DropItem/UIDropControl.cs @@ -74,6 +74,14 @@ namespace Sunny.UI 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; public void SetTipsText(ToolTip toolTip, string text) { diff --git a/SunnyUI/Controls/UINumPadTextBox.cs b/SunnyUI/Controls/UINumPadTextBox.cs index e9d968a7..1f67edc3 100644 --- a/SunnyUI/Controls/UINumPadTextBox.cs +++ b/SunnyUI/Controls/UINumPadTextBox.cs @@ -18,6 +18,7 @@ * * 2023-03-18: V3.3.3 增加文件说明 * 2023-03-26: V3.3.3 增加默认事件ValueChanged,下键盘Enter事件相应此事件 + * 2023-03-26: V3.3.4 增加了最大值、最小值等属性 ******************************************************************************/ using System; @@ -268,5 +269,35 @@ namespace Sunny.UI if (NumPadForm != null && NumPadForm.Visible) NumPadForm.Close(); } + + /// + /// 当InputType为数字类型时,能输入的最大值 + /// + [Description("当InputType为数字类型时,能输入的最大值。"), Category("SunnyUI")] + [DefaultValue(2147483647D)] + public double Maximum + { + get => edit.MaxValue; + set => edit.MaxValue = value; + } + + /// + /// 当InputType为数字类型时,能输入的最小值 + /// + [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); + } } }