From 97e259d966cb5cb5d73c105d5dbaadcc1f920614 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 18 十月 2019 13:48:43 +0800 Subject: [PATCH] 合并了全部的代码 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 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..5d191f4 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs @@ -137,9 +137,7 @@ var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost)); 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> -- Gitblit v1.8.0