Browse Source

修复小数输入问题

AddValidOverTime
shanji 2 years ago
parent
commit
6bfea14038
  1. 5
      BBWY.Client/Converters/InputNumberConverter.cs
  2. 2
      BBWY.Client/GlobalContext.cs

5
BBWY.Client/Converters/InputNumberConverter.cs

@ -18,7 +18,10 @@ namespace BBWY.Client.Converters
if (string.IsNullOrEmpty(strValue))
return null;
decimal result;
if (strValue.IndexOf('.') == strValue.Length - 1 || !decimal.TryParse(strValue, out result))
var dotIndex = strValue.IndexOf('.');
if (dotIndex == strValue.Length - 1 ||
(dotIndex != -1 && strValue.EndsWith("0")) ||
!decimal.TryParse(strValue, out result))
return DependencyProperty.UnsetValue;
return result;
}

2
BBWY.Client/GlobalContext.cs

@ -13,7 +13,7 @@ namespace BBWY.Client
{
ShopServiceGroupList = new List<string>();
ShopServiceGroupLowerList = new List<string>();
ClientVersion = "10185";
ClientVersion = "10186";
}
private User user;

Loading…
Cancel
Save