From 8b9ce384b26c414db32f98e94e088f5334869c2d Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期三, 13 十一月 2019 15:36:28 +0800 Subject: [PATCH] 全部合并了代码,安卓和 IOS 都测试通过了 --- ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswEditorForm.cs | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswEditorForm.cs index 8249786..9968b1e 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswEditorForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswEditorForm.cs @@ -193,11 +193,32 @@ /// <param name="data"></param> private void AddPhoneNumRowLayout(VerticalListControl listview, ZigBee.Device.Safeguard.PushTargetInfo data) { + var strArry = data.PushNumber.Split(new string[] { "-" }, StringSplitOptions.RemoveEmptyEntries); + if (strArry.Length != 2) + { + return; + } + string areaCode2 = strArry[0]; + string phoneNum = strArry[1]; + + string strPhone = "+" + areaCode2 + " " + phoneNum; + if (phoneNum.Length >= 11) + { + phoneNum = phoneNum.Substring(0, 3) + "".PadLeft(phoneNum.Length - 7, '*') + phoneNum.Substring(phoneNum.Length - 4, 4); + strPhone = "+" + areaCode2 + " " + phoneNum; + } + else if (phoneNum.Length >= 5) + { + //鎴栬杩欐槸鍥藉鐨勬墜鏈哄惂 + phoneNum = phoneNum.Substring(0, 3) + "".PadLeft(phoneNum.Length - 5, '*') + phoneNum.Substring(phoneNum.Length - 2, 2); + strPhone = "+" + areaCode2 + " " + phoneNum; + } + var rowContact = new RowLayoutControl(); rowContact.frameTable.UseClickStatu = false; listview.AddChidren(rowContact); //鑱旂郴鏂瑰紡 - rowContact.frameTable.AddLeftCaption("+" + data.PushNumber.Replace("-", " "), 800); + rowContact.frameTable.AddLeftCaption(strPhone + " (" + data.PushNumberNote + ")", 800); rowContact.frameTable.AddBottomLine(); //鍒犻櫎 var btnDetete = rowContact.AddDeleteControl(); -- Gitblit v1.8.0