| | |
| | | LoadEvent_Register(); |
| | | LoadEvent_LimtPasswordLength(); |
| | | LoadEvent_TextChange(); |
| | | LoadEvent_Server(); |
| | | //var areaCodeList = pm.GetAreaCode(); |
| | | } |
| | | /// <summary> |
| | |
| | | { |
| | | if ((sender as Button).IsSelected) |
| | | { |
| | | //判断是否选择了服务器,选择了才能发送验证码 |
| | | if (CheckIfSelectServer() == false) return; |
| | | |
| | | string account = etAccount.Text.Trim(); |
| | | int time = 60; |
| | | new Thread(() => |
| | |
| | | } |
| | | if (btnRegister.IsSelected) |
| | | { |
| | | //判断是否选择了服务器,选择了才能发送验证码 |
| | | if (CheckIfSelectServer() == false) return; |
| | | |
| | | waitPage = new Loading(); |
| | | new PublicAssmebly().LoadPage_WaitPage(LoadMethod_RegisterThread(), bodyView, waitPage); |
| | | } |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /// <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); |
| | | } |
| | | } |
| | | } |
| | | } |