| | |
| | | { |
| | | accountCodeFrameLayout.RemoveAll(); |
| | | account = string.Empty; |
| | | loginErrorBtn.Text = string.Empty; |
| | | if (phoneOrEmail == "Phone") |
| | | { |
| | | phoneRow = new PhoneRowForm(); |
| | |
| | | /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param> |
| | | private void Account_TextChange(object sender, string mouseEventArgs) |
| | | { |
| | | loginErrorBtn.Text = ""; |
| | | loginErrorBtn.Text = string.Empty; |
| | | if ((sender as EditText).Text.Trim().Length > 0) |
| | | { |
| | | IsRightAccount = true; |
| | |
| | | private void Register(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | this.RemoveFromParent(); |
| | | var login = new AccountLogin(); |
| | | CommonPage.Instance.AddChidren(login); |
| | | login.Show(); |
| | | var registerPage = new AccountRegister(); |
| | | CommonPage.Instance.AddChidren(registerPage); |
| | | registerPage.Show(); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | /// <param name="mouseEventArgs"></param> |
| | | private async void SendCode_MouseUpEventAsync(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | if (CheckAccount(account) == false) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | (sender as Button).Enable = (sender as Button).IsSelected = false; |
| | | CommonPage.Loading.Start(); |
| | | try |
| | |
| | | CommonPage.Loading.Hide(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// CheckAccount |
| | | /// </summary> |
| | | /// <param name="accountStr"></param> |
| | | /// <returns></returns> |
| | | private bool CheckAccount(string accountStr) |
| | | { |
| | | loginErrorBtn.Text = string.Empty; |
| | | if (phoneEmailForm.SelectedEmail.IsSelected) |
| | | { |
| | | if (AccountLogic.Instance.CheckEmail(accountStr) == false) |
| | | { |
| | | loginErrorBtn.TextID = R.MyInternationalizationString.TheEmailError; |
| | | return false; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (AccountLogic.Instance.CheckPhoneWithZone(accountStr, CommonPage.PhoneZoneStr) == false) |
| | | { |
| | | loginErrorBtn.TextID = R.MyInternationalizationString.ThePhoneError; |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ◆ 验证验证码________________________ |