From eda3fb873e59544ff36301b51e05aef64f87b0f9 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期五, 27 八月 2021 13:21:21 +0800 Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into newBranch1 --- HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs | 118 +++++++++++++++++++++++++++++++++++------------------------ 1 files changed, 70 insertions(+), 48 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs index 9de0907..2a3a276 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs @@ -16,6 +16,10 @@ FrameLayout bodyView; Button btnBind; EditText etContent; + + /// <summary> + /// + /// </summary> Action<string> action; /// <summary> @@ -30,7 +34,6 @@ /// 鏄惁鎹㈢粦 /// </summary> bool isModifyBind; - /// <summary> /// 鎵嬫満鍖哄彿 /// </summary> @@ -100,13 +103,13 @@ if (!string.IsNullOrEmpty(code)) { phoneZoneCode = code; - codeView.btnSubtitle.Text = "+" + phoneZoneCode; + codeView.BtnSubtitle.Text = "+" + phoneZoneCode; } }); }; - codeView.goAction = selectAction; - codeView.btnTilte.Text = Language.StringByID(StringId.CountryOrRegion); - codeView.btnSubtitle.Text = "+" + phoneZoneCode; + codeView.GoAction = selectAction; + codeView.BtnTilte.Text = Language.StringByID(StringId.CountryOrRegion); + codeView.BtnSubtitle.Text = "+" + phoneZoneCode; //鎵嬫満鍙疯緭鍏ユ FrameLayout rowView = new FrameLayout() @@ -144,7 +147,7 @@ Y = Application.GetRealHeight(213), Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(220), - Height = Application.GetRealHeight(44), + Height = Application.GetRealWidth(44), BackgroundColor = CSS_Color.MainColor, TextAlignment = TextAlignment.Center, TextColor = CSS_Color.MainBackgroundColor, @@ -200,7 +203,7 @@ Y = Application.GetRealHeight(213), Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(220), - Height = Application.GetRealHeight(44), + Height = Application.GetRealWidth(44), BackgroundColor = CSS_Color.MainColor, TextAlignment = TextAlignment.Center, TextColor = CSS_Color.MainBackgroundColor, @@ -277,63 +280,82 @@ } } #endregion + //鍔犺浇Loading鏁堟灉 + var waitPage = new Loading(); + bodyView.AddChidren(waitPage); + waitPage.Start(Language.StringByID(StringId.PleaseWait)); + int time = 0; //2.妫�楠岄�氳繃 new Thread(() => { - //2.2 鑾峰彇楠岃瘉鐮� - ResponsePackNew resultObj; - if (!isPhone)//閭 + try { - resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account); - } - else - { - resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account, true, phoneZoneCode); - } - - if (resultObj.Code != StateCode.SUCCESS) - { - // 鎻愮ず閿欒 - IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); - } - else - { - if (time == 0) + //2.2 鑾峰彇楠岃瘉鐮� + ResponsePackNew resultObj; + if (!isPhone)//閭 { - time = 60; - new Thread(() => + resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account); + } + else + { + resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account, true, phoneZoneCode); + } + + if (resultObj.Code != StateCode.SUCCESS) + { + // 鎻愮ず閿欒 + IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); + } + else + { + if (time == 0) { - while (time > 0) + time = 60; + new Thread(() => { - time--; + while (time > 0) + { + time--; + Application.RunOnMainThread(() => + { + button.Text = time.ToString() + "s"; + }); + Thread.Sleep(1000); + } Application.RunOnMainThread(() => { - button.Text = time.ToString() + "s"; + button.IsSelected = true; + button.TextID = StringId.GetVerificationCode; + button.BackgroundColor = CSS_Color.MainColor; + time = 0; }); - Thread.Sleep(1000); - } - Application.RunOnMainThread(() => - { - button.IsSelected = true; - button.TextID = StringId.GetVerificationCode; - button.BackgroundColor = CSS_Color.MainColor; - time = 0; - }); - }) - { IsBackground = true }.Start(); + }) + { IsBackground = true }.Start(); + } + Application.RunOnMainThread(() => + { + button.BackgroundColor = CSS_Color.PromptingColor1; + var vcp = new NewBindVerificationCodePage(); + vcp.PhoneZoneCode = phoneZoneCode; + MainPage.BasePageView.AddChidren(vcp); + vcp.LoadPage(action, titleId, account, isPhone, time, isModifyBind); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }); } + } + catch { } + finally + { Application.RunOnMainThread(() => { - button.BackgroundColor = CSS_Color.PromptingColor1; - var vcp = new NewBindVerificationCodePage(); - vcp.phoneZoneCode = phoneZoneCode; - MainPage.BasePageView.AddChidren(vcp); - vcp.LoadPage(action, titleId, account, isPhone, time, isModifyBind); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + if (waitPage != null) + { + waitPage.RemoveFromParent(); + waitPage = null; + } }); } - }) { IsBackground = true }.Start(); } -- Gitblit v1.8.0