| | |
| | | /// </summary> |
| | | public AccountForgetPWD() |
| | | { |
| | | CommonPage.Instance.IsDrawerLockMode = true; |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; |
| | | Tag = "Forgot"; |
| | | } |
| | |
| | | { |
| | | phoneEmailForm.SelectedPhone.IsSelected = phoneEmailForm.SelectedEmail.IsSelected = false; |
| | | resetBtn.Enable = resetBtn.IsSelected = false; |
| | | errorBtn.Text = string.Empty; |
| | | (sender as Button).IsSelected = true; |
| | | if ((sender as Button).Tag.ToString() == "Phone") |
| | | { |
| | |
| | | private void AddPhoneOrEmailFL(FrameLayout accountCodeFrameLayout, string phoneOrEmail) |
| | | { |
| | | accountCodeFrameLayout.RemoveAll(); |
| | | |
| | | account = 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) |
| | | { |
| | | errorBtn.Text = ""; |
| | | errorBtn.Text = string.Empty; |
| | | |
| | | if ((sender as EditText).Text.Trim().Length > 0) |
| | | { |
| | | codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = true; |
| | | account = (sender as EditText).Text.Trim(); |
| | | } |
| | | else |
| | | { |
| | | codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = false; |
| | | } |
| | | //account = (sender as EditText).Text.Trim(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param> |
| | | private void Code_TextChange(object sender, string mouseEventArgs) |
| | | { |
| | | errorBtn.Text = ""; |
| | | errorBtn.Text = string.Empty; |
| | | if ((sender as EditText).Text.Trim().Length > 0) |
| | | { |
| | | resetBtn.Enable = resetBtn.IsSelected = true; |
| | |
| | | /// <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 |
| | |
| | | errorBtn.TextID = R.MyInternationalizationString.SENDFAIL; |
| | | (sender as Button).Enable = (sender as Button).IsSelected = true; |
| | | } |
| | | else if (stateCodeStr == "EXIST") |
| | | else if (stateCodeStr == "ACCOUNTNOEXISTS") |
| | | { |
| | | //账号存在 |
| | | errorBtn.TextID = R.MyInternationalizationString.AccountHasBeenRegistered; |
| | | //账号不存在 |
| | | errorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS; |
| | | (sender as Button).Enable = (sender as Button).IsSelected = true; |
| | | } |
| | | else |
| | |
| | | CommonPage.Loading.Hide(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// CheckAccount |
| | | /// </summary> |
| | | /// <param name="accountStr"></param> |
| | | /// <returns></returns> |
| | | private bool CheckAccount(string accountStr) |
| | | { |
| | | errorBtn.Text = string.Empty; |
| | | if (phoneEmailForm.SelectedEmail.IsSelected) |
| | | { |
| | | if (AccountLogic.Instance.CheckEmail(accountStr) == false) |
| | | { |
| | | errorBtn.TextID = R.MyInternationalizationString.TheEmailError; |
| | | return false; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (AccountLogic.Instance.CheckPhoneWithZone(accountStr, CommonPage.PhoneZoneStr) == false) |
| | | { |
| | | errorBtn.TextID = R.MyInternationalizationString.ThePhoneError; |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ◆ 确认修改__________________________ |
| | |
| | | /// <param name="mouseEventArgs"></param> |
| | | private async void Reset(object sender,MouseEventArgs mouseEventArgs) |
| | | { |
| | | |
| | | if (CheckAccount(account) == false) |
| | | { |
| | | return; |
| | | } |
| | | //先判断2次密码输入是否一致 |
| | | if (pwdRow.PasswrodET.Text.Trim() != pwdComfireRow.PasswrodET.Text.Trim()) |
| | | { |
| | | var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.TwoPasswordInconsistency), Language.StringByID(R.MyInternationalizationString.Confrim)); |
| | | alert.Show(); |
| | | errorBtn.TextID = R.MyInternationalizationString.TwoPasswordInconsistency; |
| | | return; |
| | | } |
| | | if (AccountLogic.Instance.CheckPwdLength(pwdRow.PasswrodET.Text.Trim()) == false) |
| | | { |
| | | errorBtn.TextID = R.MyInternationalizationString.ThePWDLengthError; |
| | | return; |
| | | } |
| | | |
| | | CommonPage.Loading.Start(); |
| | | try |
| | | { |
| | |
| | | } |
| | | else if (stateStr == "PARAMETEROREMPTY") |
| | | { |
| | | //提供的参数错误 |
| | | errorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY; |
| | | } |
| | | else if (stateStr == "ACCOUNTNOEXISTS") |
| | | { |
| | | //账号不存在 |
| | | errorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS; |
| | | } |
| | | else if (stateStr == "FAIL") |
| | | { |
| | | //操作失败 |
| | | errorBtn.TextID = R.MyInternationalizationString.FAIL; |
| | | } |
| | | else if(stateStr == "NEWPASSWORDANDOLDPASSWORDEQUAL") |
| | | { |
| | | errorBtn.TextID = R.MyInternationalizationString.NEWPASSWORDANDOLDPASSWORDEQUAL; |
| | | } |
| | | else |
| | | { |
| | | errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed; |
| | | } |
| | | |
| | | } |
| | | else if (stateCodeStr == "PARAMETEROREMPTY") |
| | | { |