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/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