* UIDoubleUpDown: 增加禁止输入属性

* UIIntegerUpDown: 增加禁止输入属性
This commit is contained in:
Sunny 2022-05-05 17:38:35 +08:00
parent 686d5cf828
commit 516e82f287
2 changed files with 12 additions and 0 deletions

View File

@ -23,6 +23,7 @@
* 2022-01-28: V3.1.0 00 * 2022-01-28: V3.1.0 00
* 2022-02-07: V3.1.0 * 2022-02-07: V3.1.0
* 2022-02-24: V3.1.1 * 2022-02-24: V3.1.1
* 2022-05-05: V3.1.8
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -54,6 +55,10 @@ namespace Sunny.UI
pnlValue.Paint += PnlValue_Paint; pnlValue.Paint += PnlValue_Paint;
} }
[DefaultValue(false)]
[Description("禁止输入"), Category("SunnyUI")]
public bool ForbidInput { get; set; }
public Control ExToolTipControl() public Control ExToolTipControl()
{ {
return pnlValue; return pnlValue;
@ -159,6 +164,7 @@ namespace Sunny.UI
private void btnAdd_Click(object sender, EventArgs e) private void btnAdd_Click(object sender, EventArgs e)
{ {
if (ForbidInput) return;
if (ReadOnly) return; if (ReadOnly) return;
Value += Step; Value += Step;

View File

@ -22,6 +22,7 @@
* 2020-12-10: V3.0.9 Readonly属性 * 2020-12-10: V3.0.9 Readonly属性
* 2022-02-07: V3.1.0 * 2022-02-07: V3.1.0
* 2022-02-24: V3.1.1 * 2022-02-24: V3.1.1
* 2022-05-05: V3.1.8
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -51,6 +52,10 @@ namespace Sunny.UI
pnlValue.Paint += PnlValue_Paint; pnlValue.Paint += PnlValue_Paint;
} }
[DefaultValue(false)]
[Description("禁止输入"), Category("SunnyUI")]
public bool ForbidInput { get; set; }
public Control ExToolTipControl() public Control ExToolTipControl()
{ {
return pnlValue; return pnlValue;
@ -137,6 +142,7 @@ namespace Sunny.UI
private void btnAdd_Click(object sender, EventArgs e) private void btnAdd_Click(object sender, EventArgs e)
{ {
if (ForbidInput) return;
if (ReadOnly) return; if (ReadOnly) return;
Value += Step; Value += Step;