From 25bb055b0249d86548883083bb315922e6a2076b Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 24 十一月 2020 15:39:08 +0800 Subject: [PATCH] 2020-11-24 1.注册增加服务器选择。 2.增加极光推送接口 --- HDL_ON/UI/UI1-Login/RegisterPageBLL.cs | 63 +++++++++++++++++++++++++++++++ 1 files changed, 63 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs index 25fd27b..76192f9 100644 --- a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs +++ b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs @@ -21,6 +21,7 @@ LoadEvent_Register(); LoadEvent_LimtPasswordLength(); LoadEvent_TextChange(); + LoadEvent_Server(); //var areaCodeList = pm.GetAreaCode(); } /// <summary> @@ -367,6 +368,9 @@ { if ((sender as Button).IsSelected) { + //鍒ゆ柇鏄惁閫夋嫨浜嗘湇鍔″櫒锛岄�夋嫨浜嗘墠鑳藉彂閫侀獙璇佺爜 + if (CheckIfSelectServer() == false) return; + string account = etAccount.Text.Trim(); int time = 60; new Thread(() => @@ -502,6 +506,9 @@ } if (btnRegister.IsSelected) { + //鍒ゆ柇鏄惁閫夋嫨浜嗘湇鍔″櫒锛岄�夋嫨浜嗘墠鑳藉彂閫侀獙璇佺爜 + if (CheckIfSelectServer() == false) return; + waitPage = new Loading(); new PublicAssmebly().LoadPage_WaitPage(LoadMethod_RegisterThread(), bodyView, waitPage); } @@ -589,5 +596,61 @@ } }); } + + /// <summary> + /// 鍔犺浇鏈嶅姟鍣ㄩ�夋嫨鎸夐挳浜嬩欢 + /// </summary> + void LoadEvent_Server() + { + EventHandler<MouseEventArgs> eventHandler = (sender, e) => + { + Action selectAction = () => + { + //鏈嶅姟鍣ㄩ�夋嫨杩囨爣璁颁负true + isSelectServer = true; + ShowServerBottomLineState(false); + btnServerText.Text = UserInfo.Current.GlobalRegion.regionName; + }; + new SelectServerDialog(selectAction).LoadPage(); + + }; + + btnServerGo.MouseUpEventHandler = eventHandler; + btnServerText.MouseUpEventHandler = eventHandler; + } + + /// <summary> + /// 妫�娴嬫槸鍚﹂�夋嫨浜嗘湇鍔″櫒 + /// </summary> + /// <returns></returns> + private bool CheckIfSelectServer() + { + if (isSelectServer == false) + { + //璇峰厛閫夋嫨鍥藉/鍖哄煙 + Utlis.ShowTip(Language.StringByID(StringId.PleaseSelectCountryOrRegion)); + ShowServerBottomLineState(true); + return false; + } + return true; + } + + /// <summary> + /// 鏈嶅姟鍣ㄤ笅鍒掔嚎鏍峰紡 + /// </summary> + /// <param name="isError"></param> + void ShowServerBottomLineState(bool isError) + { + if (isError) + { + btnServerBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; + btnServerBottomLine.Height = Application.GetRealHeight(2); + } + else + { + btnServerBottomLine.BackgroundColor = CSS_Color.DividingLineColor; + btnServerBottomLine.Height = Application.GetRealHeight(1); + } + } } } \ No newline at end of file -- Gitblit v1.8.0