From 9e89e605d5429babb4b33df2e47ea86dff9d2ba7 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 20 十一月 2025 11:55:04 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/Utility/UIHelper.cs | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Main/Utility/UIHelper.cs b/Main/Utility/UIHelper.cs
index 8767f39..2cd0ea7 100644
--- a/Main/Utility/UIHelper.cs
+++ b/Main/Utility/UIHelper.cs
@@ -66,6 +66,8 @@
#region UI閫氱敤
+
+ //榛樿璐у竵鍥剧墖鐢ㄩ珮娓呯殑锛屽瘜鏂囨湰鐨勫彲浠ョ敤灏忓浘鏍囧埄浜庢帓鐗堟樉绀�
public static void SetIconWithMoneyType(this Image _image, int moneyType)
{
if (_image == null) return;
@@ -226,7 +228,7 @@
/// 澶ф暟鍊艰浆鍖� 鏍煎紡 鏈�澶氫袱涓皬鏁� ,鍚戜笅鍙栨暣
/// K -鍗冿紝M -鐧捐惉锛孊-鍗佸剟锛孴 -钀剟
/// </summary>
- public static string ReplaceLargeNum(double num)
+ public static string ReplaceLargeNum(double num, int decimalPlaces = 1)
{
const long K = 10000; //鍥藉唴涓轰竾锛屾捣澶栦负鍗�
const long M = K * 10000;
@@ -243,15 +245,15 @@
}
else if (num >= M)
{
- return StringUtility.Contact(FormatWithoutRounding(num / M, 1), Language.Get("L1070"));
+ return StringUtility.Contact(FormatWithoutRounding(num / M, decimalPlaces), Language.Get("L1070"));
}
else if (num >= K)
{
- return StringUtility.Contact(FormatWithoutRounding(num / K, 1), Language.Get("L1071"));
+ return StringUtility.Contact(FormatWithoutRounding(num / K, decimalPlaces), Language.Get("L1071"));
}
else
{
- return FormatWithoutRounding(num, 1);
+ return FormatWithoutRounding(num, decimalPlaces);
}
}
@@ -1308,7 +1310,7 @@
//bool pureChinese = Regex.IsMatch(name, "^[\u4e00-\u9fa5]+$");
//var chsCount = GetChsCount(name);
int length = Encoding.Default.GetBytes(name).Length;
- var maxlength = 14; //绾腑鏂囦笉寤鸿瓒呰繃7涓瓧
+ var maxlength = 21; //绾腑鏂囦笉寤鸿瓒呰繃7涓瓧
var minlength = 3;
if (length > maxlength)
{
--
Gitblit v1.8.0