| | |
| | | LoadEvent_Register(); |
| | | LoadEvent_LimtPasswordLength(); |
| | | LoadEvent_TextChange(); |
| | | LoadEvent_Server(); |
| | | //var areaCodeList = pm.GetAreaCode(); |
| | | } |
| | | /// <summary> |
| | |
| | | //选择手机注册 |
| | | btnPhoneLogin.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (registerType == 0) |
| | | if(registerType == 0) |
| | | { |
| | | return; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | if (accountType == 0) |
| | | if(accountType ==0) |
| | | { |
| | | registerPhone = etAccount.Text.Trim(); |
| | | } |
| | |
| | | { |
| | | if ((sender as Button).IsSelected) |
| | | { |
| | | //判断是否选择了服务器,选择了才能发送验证码 |
| | | if (CheckIfSelectServer() == false) return; |
| | | |
| | | string account = etAccount.Text.Trim(); |
| | | int time = 60; |
| | | new Thread(() => |
| | |
| | | { |
| | | //短信发送间隔60s |
| | | (sender as Button).IsSelected = false; |
| | | |
| | | |
| | | }); |
| | | //2.1 开始倒计时 |
| | | new Thread(() => |
| | |
| | | IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); |
| | | } |
| | | |
| | | } |
| | | else if (result.Code.ToUpper() == StateCode.SUCCESS) |
| | | }else if (result.Code.ToUpper() == StateCode.SUCCESS) |
| | | { |
| | | //3.提示账号已存在,无法重复注册 |
| | | Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.AccountAlreadyUse)); |
| | | } |
| | | else |
| | | } else |
| | | { |
| | | //4.提示其它异常错误 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(result.Code); |
| | |
| | | { |
| | | btnRegister.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (etPassword.Text.Trim().Length > 13 || etPassword.Text.Trim().Length < 6) |
| | | if(etPassword.Text.Trim().Length > 13 || etPassword.Text.Trim().Length<6) |
| | | { |
| | | new Tip() |
| | | { |
| | |
| | | } |
| | | if (btnRegister.IsSelected) |
| | | { |
| | | //判断是否选择了服务器,选择了才能发送验证码 |
| | | if (CheckIfSelectServer() == false) return; |
| | | |
| | | waitPage = new Loading(); |
| | | new PublicAssmebly().LoadPage_WaitPage(LoadMethod_RegisterThread(), bodyView, waitPage); |
| | | } |
| | |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载服务器选择按钮事件 |
| | | /// </summary> |
| | | void LoadEvent_Server() |
| | | { |
| | | //判断之前是否选择过 |
| | | if (UserInfo.Current.GlobalRegion != null && !string.IsNullOrEmpty(UserInfo.Current.GlobalRegion.regionUrl)) |
| | | { |
| | | |
| | | SetServerText(); |
| | | } |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | Action selectAction = () => |
| | | { |
| | | //服务器选择过标记为true |
| | | SetServerText(); |
| | | }; |
| | | 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); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | void SetServerText() |
| | | { |
| | | //服务器选择过标记为true |
| | | isSelectServer = true; |
| | | ShowServerBottomLineState(false); |
| | | btnServerText.TextColor = CSS_Color.FirstLevelTitleColor; |
| | | btnServerText.Text = UserInfo.Current.GlobalRegion.regionName; |
| | | } |
| | | } |
| | | } |