From 7b60238359b94125d591678eff105ae2bf47843f Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 15 十一月 2019 13:16:21 +0800
Subject: [PATCH] 2019.11.15
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs | 31 +++++++++++++++----------------
1 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs
index 4319b59..9427cee 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs
@@ -133,13 +133,11 @@
}
catch (Exception ex)
{
- //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
- var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
+ //鍑虹幇鏈煡閿欒
+ var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError));
alert.Show();
//Log鍑哄姏
- string msg = ex.Message + "\r\n";
- msg += ex.TargetSite.ToString();
- HdlLogLogic.Current.WriteLog(-1, msg);
+ HdlLogLogic.Current.WriteLog(ex);
}
}
}
@@ -220,18 +218,19 @@
int byteLength = 0;
for (int i = 0; i < i_text.Length; i++)
{
- int length = Encoding.UTF8.GetBytes(i_text[i].ToString()).Length;
- if (length == 1)
- {
- //鑻辨枃
- byteLength += length;
- continue;
- }
- //涓枃(鏆傛椂鐢ㄤ腑鏂囧搴�)
- byteLength += Encoding.GetEncoding("gb2312").GetBytes(i_text[i].ToString()).Length;
+ byteLength += Encoding.UTF8.GetBytes(i_text[i].ToString()).Length;
+ //int length = Encoding.UTF8.GetBytes(i_text[i].ToString()).Length;
+ //if (length == 1)
+ //{
+ // //鑻辨枃
+ // byteLength += length;
+ // continue;
+ //}
+ ////涓枃(鏆傛椂鐢ㄤ腑鏂囧搴�)
+ //byteLength += Encoding.GetEncoding("gb2312").GetBytes(i_text[i].ToString()).Length;
}
int realWidth = byteLength * (int)textSize;
- return Application.GetRealWidth(realWidth);
+ return Application.GetRealWidth(realWidth + 20);
}
/// <summary>
@@ -241,7 +240,7 @@
{
var btnShadow = new PicViewControl(this.Width, Application.GetMinRealAverage(45), false);
btnShadow.X = this.X;
- btnShadow.Y = this.Bottom - 1;
+ btnShadow.Y = this.Bottom;
btnShadow.UnSelectedImagePath = "Item/BottomShadow.png";
this.Parent.AddChidren(btnShadow);
}
--
Gitblit v1.8.0