From e87985ec1dcb69beedaf9f95e8e7aba14b7c08d6 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 09 十二月 2020 18:50:14 +0800 Subject: [PATCH] 2020-12-09 1.信息中心,增加下划线和点击Alter提醒详情。 --- HDL_ON/UI/UI1-Login/RegisterPageBLL.cs | 141 ++++++++++++++++++++++++++++++----------------- 1 files changed, 90 insertions(+), 51 deletions(-) diff --git a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs index 1c8ae6d..324c450 100644 --- a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs +++ b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs @@ -373,68 +373,91 @@ string account = etAccount.Text.Trim(); int time = 60; + //鍔犺浇Loading鏁堟灉 + var waitPage = new Loading(); + bodyView.AddChidren(waitPage); + waitPage.Start(Language.StringByID(StringId.PleaseWait)); + new Thread(() => { - //1.鍏堟鏌ヨ处鍙锋槸鍚︽敞鍐岃繃 - var result = pm.GetRegionByAccount(account); - //2.璐﹀彿涓嶅瓨鍦紝鎵嶅厑璁哥户缁敞鍐� - if (result.Code == StateCode.ACCOUNT_NOT_EXIST) + try { - //璐﹀彿涓嶅瓨鍦� 鏈敞鍐屽厑璁稿彂閫侀獙璇佺爜娉ㄥ唽 - Application.RunOnMainThread(() => + //1.鍏堟鏌ヨ处鍙锋槸鍚︽敞鍐岃繃 + var result = pm.GetRegionByAccount(account); + //2.璐﹀彿涓嶅瓨鍦紝鎵嶅厑璁哥户缁敞鍐� + if (result.Code == StateCode.ACCOUNT_NOT_EXIST) { - //鐭俊鍙戦�侀棿闅�60s - (sender as Button).IsSelected = false; + //璐﹀彿涓嶅瓨鍦� 鏈敞鍐屽厑璁稿彂閫侀獙璇佺爜娉ㄥ唽 - }); - //2.1 寮�濮嬪�掕鏃� - new Thread(() => - { - while (time > 0) + //2.2 鑾峰彇楠岃瘉鐮� + ResponsePackNew resultObj; + if (registerType == 1)//閭 { - time--; + resultObj = pm.VerificationCodeSend(VerifyType.REGISTER_USER, account); + } + else + { + resultObj = pm.VerificationCodeSend(VerifyType.REGISTER_USER, account, true, phoneZoneCode); + } + + if (resultObj.Code != StateCode.SUCCESS) + { + // 鎻愮ず閿欒 + IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); + } + else + { + //2.1 寮�濮嬪�掕鏃� Application.RunOnMainThread(() => { - (sender as Button).Text = time.ToString() + "s"; - }); - Thread.Sleep(1000); - } - Application.RunOnMainThread(() => - { - //鍥炲鑾峰彇鐭俊鎸夐挳浜嬩欢 - (sender as Button).IsSelected = true; - (sender as Button).TextID = StringId.GetVerificationCode; - }); - }) - { IsBackground = true }.Start(); + //鐭俊鍙戦�侀棿闅�60s + (sender as Button).IsSelected = false; - //2.2 鑾峰彇楠岃瘉鐮� - ResponsePackNew resultObj; - if (registerType == 1)//閭 + }); + new Thread(() => + { + while (time > 0) + { + time--; + Application.RunOnMainThread(() => + { + (sender as Button).Text = time.ToString() + "s"; + }); + Thread.Sleep(1000); + } + Application.RunOnMainThread(() => + { + //鍥炲鑾峰彇鐭俊鎸夐挳浜嬩欢 + (sender as Button).IsSelected = true; + (sender as Button).TextID = StringId.GetVerificationCode; + }); + }) + { IsBackground = true }.Start(); + } + + } + else if (result.Code.ToUpper() == StateCode.SUCCESS) { - resultObj = pm.VerificationCodeSend(VerifyType.REGISTER_USER, account); + //3.鎻愮ず璐﹀彿宸插瓨鍦紝鏃犳硶閲嶅娉ㄥ唽 + Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.AccountAlreadyUse)); } else { - resultObj = pm.VerificationCodeSend(VerifyType.REGISTER_USER, account, true, phoneZoneCode); + //4.鎻愮ず鍏跺畠寮傚父閿欒 + IMessageCommon.Current.ShowErrorInfoAlter(result.Code); } - - if (resultObj.Code != StateCode.SUCCESS) + } + catch { } + finally + { + Application.RunOnMainThread(() => { - // 鎻愮ず閿欒 - IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); - } - - } - else if (result.Code.ToUpper() == StateCode.SUCCESS) - { - //3.鎻愮ず璐﹀彿宸插瓨鍦紝鏃犳硶閲嶅娉ㄥ唽 - Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.AccountAlreadyUse)); - } - else - { - //4.鎻愮ず鍏跺畠寮傚父閿欒 - IMessageCommon.Current.ShowErrorInfoAlter(result.Code); + if (waitPage != null) + { + waitPage.RemoveFromParent(); + waitPage = null; + } + }); } }) { IsBackground = true }.Start(); @@ -604,15 +627,19 @@ /// </summary> void LoadEvent_Server() { + //鍒ゆ柇涔嬪墠鏄惁閫夋嫨杩� + if (UserInfo.Current.GlobalRegion != null && !string.IsNullOrEmpty(UserInfo.Current.GlobalRegion.regionUrl)) + { + + SetServerText(); + } + EventHandler<MouseEventArgs> eventHandler = (sender, e) => { Action selectAction = () => { //鏈嶅姟鍣ㄩ�夋嫨杩囨爣璁颁负true - isSelectServer = true; - ShowServerBottomLineState(false); - btnServerText.TextColor = CSS_Color.FirstLevelTitleColor; - btnServerText.Text = UserInfo.Current.GlobalRegion.regionName; + SetServerText(); }; new SelectServerDialog(selectAction).LoadPage(); @@ -655,5 +682,17 @@ btnServerBottomLine.Height = Application.GetRealHeight(1); } } + + /// <summary> + /// + /// </summary> + void SetServerText() + { + //鏈嶅姟鍣ㄩ�夋嫨杩囨爣璁颁负true + isSelectServer = true; + ShowServerBottomLineState(false); + btnServerText.TextColor = CSS_Color.FirstLevelTitleColor; + btnServerText.Text = UserInfo.Current.GlobalRegion.regionName; + } } } \ No newline at end of file -- Gitblit v1.8.0