From dc0309e64f02227d8e1468b7326c07955f804612 Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期三, 22 六月 2022 11:22:18 +0800
Subject: [PATCH] 修改引用路径

---
 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs
index 5b796b4..5107160 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs
@@ -65,6 +65,8 @@
             btnLine.Y = txtValue.Bottom;
             btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
             frame.AddChidren(btnLine);
+            //鑱斿姩绾跨殑鐘舵��
+            txtValue.btnLine = btnLine;
 
             if (string.IsNullOrEmpty(UserCenterResourse.UserInfo.Email) == false)
             {
@@ -93,7 +95,11 @@
             btnCodeControl.FinishInputEvent += (value) =>
             {
                 //鏍¢獙楠岃瘉鐮�
-                this.CheckVerificationCode(value);
+                if (this.CheckVerificationCode(value) == false)
+                {
+                    //娓呯┖楠岃瘉鐮�
+                    btnCodeControl.ClearInputValue();
+                }
             };
 
             //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
@@ -102,6 +108,7 @@
             btnErrorMsg.TextAlignment = TextAlignment.Center;
             btnErrorMsg.TextColor = 0xfff75858;
             btnErrorMsg.TextID = R.MyInternationalizationString.uVerificationCodeErrorInputAgain;
+            btnErrorMsg.IsBold = true;
             bodyFrameLayout.AddChidren(btnErrorMsg);
             btnErrorMsg.Visible = false;
 
@@ -113,6 +120,9 @@
             btnOk.CanClick = false;
             btnOk.ButtonClickEvent += (sender, e) =>
             {
+                //娓呯┖杈撳叆鐨勫��
+                btnCodeControl.ClearInputValue();
+
                 this.btnErrorMsg.Visible = false;
                 //妫�娴嬮偖绠辩殑鍦板潃
                 if (this.CheckEmail(txtValue.Text.Trim()) == false)
@@ -145,12 +155,12 @@
         /// <summary>
         /// 鍙戦�侀獙璇佺爜鍒伴偖绠�
         /// </summary>
-        private async void SendCodeToEmail(BottomClickButton btnNext, string Email)
+        private void SendCodeToEmail(BottomClickButton btnNext, string Email)
         {
             var sendCodePra = new SendCodePra();
             sendCodePra.Account = Email;
 
-            bool falge = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/RegisterSendVerCode", false, sendCodePra);
+            bool falge = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/RegisterSendVerCode", false, sendCodePra);
             if (falge == false)
             {
                 return;
@@ -176,7 +186,7 @@
                     System.Threading.Thread.Sleep(1000);
                     if (waitime == 0)
                     {
-                        Application.RunOnMainThread(() =>
+                        HdlThreadLogic.Current.RunMain(() =>
                         {
                             if (btnNext != null)
                             {
@@ -188,13 +198,13 @@
                         });
                         break;
                     }
-                    Application.RunOnMainThread(() =>
+                    HdlThreadLogic.Current.RunMain(() =>
                     {
                         if (btnNext != null)
                         {
                             btnNext.Text = waitime + "s" + repeat;
                         }
-                    });
+                    }, ShowErrorMode.NO);
                 }
             });
         }
@@ -207,41 +217,42 @@
         /// 楠岃瘉楠岃瘉鐮�
         /// </summary>
         /// <returns></returns>
-        private async void CheckVerificationCode(string code)
+        private bool CheckVerificationCode(string code)
         {
             if (this.canCheckCode == false)
             {
                 //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
                 this.btnErrorMsg.Visible = true;
                 this.btnErrorMsg.TextID = R.MyInternationalizationString.uVerificationCodeErrorInputAgain;
-                return;
+                return false;
             }
             var checkCodePra = new CheckCodePra();
             checkCodePra.Code = code;
             checkCodePra.Account = newEmail;
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
             if (flage == false)
             {
                 //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
                 this.btnErrorMsg.Visible = true;
                 this.btnErrorMsg.TextID = R.MyInternationalizationString.uVerificationCodeErrorInputAgain;
-                return;
+                return false;
             }
 
             //鍙樻洿閭
             this.SaveNewEmail();
+            return true;
         }
 
         /// <summary>
         /// 鍙樻洿閭
         /// </summary>
-        private async void SaveNewEmail()
+        private void SaveNewEmail()
         {
             var pra = new SaveNewEmailPra();
             pra.Account = this.newEmail;
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindAccount", false, pra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindAccount", false, pra);
             if (flage == false)
             {
                 //缁戝畾閭澶辫触

--
Gitblit v1.8.0