* UIEdit: 修复了一个最小值大于0是,显示类型为字符串Text为空仍有显示的问题
This commit is contained in:
parent
c1df84826e
commit
354a30dcb7
@ -17,6 +17,7 @@
|
|||||||
* 创建日期: 2020-01-01
|
* 创建日期: 2020-01-01
|
||||||
*
|
*
|
||||||
* 2020-01-01: V2.2.0 增加文件说明
|
* 2020-01-01: V2.2.0 增加文件说明
|
||||||
|
* 2022-12-18: V3.3.0 修复了一个最小值大于0是,显示类型为字符串Text为空仍有显示的问题
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@ -387,8 +388,11 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
Text = value.ToString("f" + decLength);
|
if (Type == UITextBox.UIEditType.Double)
|
||||||
CheckMaxMin();
|
{
|
||||||
|
Text = value.ToString("f" + decLength);
|
||||||
|
CheckMaxMin();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,39 +406,14 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
Text = value.ToString();
|
if (Type == UITextBox.UIEditType.Integer)
|
||||||
CheckMaxMin();
|
{
|
||||||
|
Text = value.ToString();
|
||||||
|
CheckMaxMin();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//[DefaultValue(int.MaxValue)]
|
|
||||||
//public double MaxValue
|
|
||||||
//{
|
|
||||||
// get => maxValue;
|
|
||||||
// set
|
|
||||||
// {
|
|
||||||
// maxValue = value;
|
|
||||||
// if (maxValue < minValue)
|
|
||||||
// minValue = maxValue;
|
|
||||||
// CheckMaxMin();
|
|
||||||
// Invalidate();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//[DefaultValue(int.MinValue)]
|
|
||||||
//public double MinValue
|
|
||||||
//{
|
|
||||||
// get => minValue;
|
|
||||||
// set
|
|
||||||
// {
|
|
||||||
// minValue = value;
|
|
||||||
// if (minValue > maxValue)
|
|
||||||
// maxValue = minValue;
|
|
||||||
// CheckMaxMin();
|
|
||||||
// Invalidate();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
private string DecimalToMask(int iDecimal)
|
private string DecimalToMask(int iDecimal)
|
||||||
{
|
{
|
||||||
if (iDecimal == 0)
|
if (iDecimal == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user