黄学彪
2019-11-13 8b9ce384b26c414db32f98e94e088f5334869c2d
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();