From f6e34a69f1d1e0b0b3a6252fe20acddca7fe56e5 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期二, 17 三月 2020 15:43:44 +0800 Subject: [PATCH] 2020-03-17-1 --- ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs | 40 ++++++++++++++++++++++++++-------------- 1 files changed, 26 insertions(+), 14 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs index 86513a8..8a14e1a 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs @@ -42,6 +42,21 @@ btnIcon.InitControl(); btnIcon.ButtonClickEvent += ((sender, e) => { + Contacts.ContactAction = (phoneName, phoneNum) => + { + if (string.IsNullOrEmpty(phoneName) == true) + { + return; + } + //鎵嬫満鍙锋娴� + if (this.CheckPhoneNumber("86", phoneNum, phoneName) == false) + { + return; + } + //淇濆瓨鑱旂郴浜� + this.SaveCoercePhoneNumber("86", phoneNum, phoneName); + }; + Contacts.Open(); }); //鍒濆鍖栦腑閮ㄤ俊鎭� @@ -101,12 +116,14 @@ btnLine.Y = Application.GetRealHeight(150); btnLine.Gravity = Gravity.CenterHorizontal; frameBack.AddChidren(btnLine); + //鑱斿姩绾跨殑鐘舵�� + txtPhone.btnLine = btnLine; //澶囨敞 var txtNote = new TextInputControl(Application.GetRealWidth(740), txtPhone.Height, false); txtNote.X = ControlCommonResourse.XXLeft; txtNote.Y = btnLine.Bottom + Application.GetRealHeight(60); - txtNote.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInpuBackup); + txtNote.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPlesaeInputNoteInformation); frameBack.AddChidren(txtNote); //鍙栨秷鍥炬爣 var btnCancel2 = new MostRightIconControl(69, 69); @@ -153,13 +170,16 @@ /// </summary> /// <param name="areaCode"></param> /// <param name="phoneNum"></param> + /// <param name="strNote"></param> private async void SaveCoercePhoneNumber(string areaCode, string phoneNum, string strNote) { - Dictionary<string, string> dicPhone = new Dictionary<string, string>(); - dicPhone[phoneNum] = areaCode; + var listPhone = new List<string>(); + listPhone.Add(areaCode + "-" + phoneNum); + var listNote = new List<string>(); + listNote.Add(strNote); //鍙樻洿 - var result = await HdlSafeguardLogic.Current.SetCoercePhoneNumber(dicPhone); + var result = await HdlSafeguardLogic.Current.SetCoercePhoneNumber(listPhone, listNote); if (result == false) { return; @@ -188,8 +208,8 @@ } if (strNote == string.Empty) { - //璇疯緭鍏ュ娉ㄥ悕绉� - btnErrorMsg.Text = Language.StringByID(R.MyInternationalizationString.uPleaseInpuBackup); + //璇疯緭鍏ュ娉ㄥ唴瀹� + btnErrorMsg.Text = Language.StringByID(R.MyInternationalizationString.uPlesaeInputNoteInformation); return false; } @@ -216,13 +236,5 @@ } #endregion - - - - - - - - } } -- Gitblit v1.8.0