From 20e6545a5141eab12eeb71fa379259f5d1e069bd Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 16 Sep 2022 22:42:25 +0800 Subject: [PATCH] =?UTF-8?q?*=20UIIntegerUpDown:=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=8F=AF=E4=BB=A5=E5=8F=8C=E5=87=BB=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E5=B1=9E=E6=80=A7=20*=20UIDoubleUpDown:=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=98=AF=E5=90=A6=E5=8F=AF=E4=BB=A5=E5=8F=8C=E5=87=BB?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Controls/UIDoubleUpDown.cs | 6 ++++++ SunnyUI/Controls/UIIntegerUpDown.cs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/SunnyUI/Controls/UIDoubleUpDown.cs b/SunnyUI/Controls/UIDoubleUpDown.cs index 39a13a64..b0e31dfb 100644 --- a/SunnyUI/Controls/UIDoubleUpDown.cs +++ b/SunnyUI/Controls/UIDoubleUpDown.cs @@ -24,6 +24,7 @@ * 2022-02-07: V3.1.0 增加圆角控制 * 2022-02-24: V3.1.1 可以设置按钮大小和颜色 * 2022-05-05: V3.1.8 增加禁止输入属性 + * 2022-09-16: V3.2.4 增加是否可以双击输入属性 ******************************************************************************/ using System; @@ -294,11 +295,16 @@ namespace Sunny.UI } } + [DefaultValue(true)] + [Description("是否可以双击输入"), Category("SunnyUI")] + public bool Inputable { get; set; } = true; + private readonly UIEdit edit = new UIEdit(); private Color pnlColor; private void pnlValue_DoubleClick(object sender, EventArgs e) { if (ReadOnly) return; + if (!Inputable) return; edit.Left = 1; edit.Top = (pnlValue.Height - edit.Height) / 2; diff --git a/SunnyUI/Controls/UIIntegerUpDown.cs b/SunnyUI/Controls/UIIntegerUpDown.cs index 59e3c75e..311b3cc2 100644 --- a/SunnyUI/Controls/UIIntegerUpDown.cs +++ b/SunnyUI/Controls/UIIntegerUpDown.cs @@ -23,6 +23,7 @@ * 2022-02-07: V3.1.0 增加圆角控制 * 2022-02-24: V3.1.1 可以设置按钮大小和颜色 * 2022-05-05: V3.1.8 增加禁止输入属性 + * 2022-09-16: V3.2.4 增加是否可以双击输入属性 ******************************************************************************/ using System; @@ -280,11 +281,16 @@ namespace Sunny.UI } } + [DefaultValue(true)] + [Description("是否可以双击输入"), Category("SunnyUI")] + public bool Inputable { get; set; } = true; + private readonly UIEdit edit = new UIEdit(); private Color pnlColor; private void pnlValue_DoubleClick(object sender, EventArgs e) { if (ReadOnly) return; + if (!Inputable) return; edit.Left = 1; edit.Top = (pnlValue.Height - edit.Height) / 2;