| | |
| | | rowOldPsw.Y = Application.GetRealHeight(26);
|
| | | frameBackGroud.AddChidren(rowOldPsw);
|
| | | var txtoldPsw = new TextInputControl(Application.GetRealWidth(800), rowOldPsw.Height);
|
| | | txtoldPsw.X = HdlControlResourse.XXLeft;
|
| | | txtoldPsw.X = ControlCommonResourse.XXLeft;
|
| | | txtoldPsw.SecureTextEntry = true;
|
| | | txtoldPsw.PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputOldPsw);
|
| | | rowOldPsw.AddChidren(txtoldPsw);
|
| | |
| | | btnForgotPsw.TextID = R.MyInternationalizationString.ForgotPasswordMsg;
|
| | | btnForgotPsw.TextAlignment = TextAlignment.CenterRight;
|
| | | frameBackGroud.AddChidren(btnForgotPsw);
|
| | | btnForgotPsw.X = bodyFrameLayout.Width - HdlControlResourse.XXLeft - btnForgotPsw.Width;
|
| | | btnForgotPsw.X = bodyFrameLayout.Width - ControlCommonResourse.XXLeft - btnForgotPsw.Width;
|
| | | btnForgotPsw.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new ForgotAccountPasswordForm();
|
| | |
| | | rowNewPsw.Y = Application.GetRealHeight(236);
|
| | | frameBackGroud.AddChidren(rowNewPsw);
|
| | | var txtNewPsw = new TextInputControl(Application.GetRealWidth(800), rowNewPsw.Height);
|
| | | txtNewPsw.X = HdlControlResourse.XXLeft;
|
| | | txtNewPsw.X = ControlCommonResourse.XXLeft;
|
| | | txtNewPsw.SecureTextEntry = true;
|
| | | txtNewPsw.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputNewPassword);
|
| | | rowNewPsw.AddChidren(txtNewPsw);
|
| | |
| | | rowConfirmPsw.Y = rowNewPsw.Bottom + Application.GetRealHeight(10);
|
| | | frameBackGroud.AddChidren(rowConfirmPsw);
|
| | | var txtConfirmPsw = new TextInputControl(Application.GetRealWidth(800), rowConfirmPsw.Height);
|
| | | txtConfirmPsw.X = HdlControlResourse.XXLeft;
|
| | | txtConfirmPsw.X = ControlCommonResourse.XXLeft;
|
| | | txtConfirmPsw.SecureTextEntry = true;
|
| | | txtConfirmPsw.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseRepeatInputNewPassword);
|
| | | rowConfirmPsw.AddChidren(txtConfirmPsw);
|
| | |
| | | return;
|
| | | }
|
| | | //保存密码
|
| | | this.SavePassword(txtoldPsw.Text, txtConfirmPsw.Text);
|
| | | this.SavePassword(txtConfirmPsw.Text);
|
| | | };
|
| | | }
|
| | |
|
| | |
| | | /// <summary>
|
| | | /// 保存密码
|
| | | /// </summary>
|
| | | /// <param name="i_oldPsw"></param>
|
| | | /// <param name="i_newPsw"></param>
|
| | | private void SavePassword(string i_oldPsw, string i_newPsw)
|
| | | /// <param name="newPassword"></param>
|
| | | private void SavePassword(string newPassword)
|
| | | {
|
| | | //编辑密码
|
| | | var result = HdlAccountLogic.Current.EditorPassword(i_oldPsw, i_newPsw);
|
| | | if (result == false)
|
| | | var pra = new SavePasswordPra();
|
| | | pra.NewPassword = newPassword;
|
| | |
|
| | | //更改密码
|
| | | bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdatePassword", false, pra);
|
| | | if (flage == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | this.ShowMassage(ShowMsgType.Remind, msg, () =>
|
| | | {
|
| | | //从新登录
|
| | | HdlAccountLogic.Current.ReLoginAgain(Common.Config.Instance.Account);
|
| | | UserCenterLogic.ReLoginAgain(Common.Config.Instance.Account);
|
| | | }, Language.StringByID(R.MyInternationalizationString.Login));
|
| | | }
|
| | |
|
| | |
| | | this.msgControl.TextID = R.MyInternationalizationString.uPleaseRepeatInputNewPassword;
|
| | | return false;
|
| | | }
|
| | | if (oldPsw != Common.Config.Instance.Password)
|
| | | {
|
| | | //密码错误,请重新输入
|
| | | this.msgControl.TextID = R.MyInternationalizationString.uOldPsswordIsError;
|
| | | return false;
|
| | | }
|
| | | if (newPsw != newPsw2)
|
| | | {
|
| | | //确认密码不一致,请重新输入
|
| | |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 结构体_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 保存密码的启动参数类
|
| | | /// </summary>
|
| | | private class SavePasswordPra
|
| | | {
|
| | | /// <summary>
|
| | | /// 旧密码
|
| | | /// </summary>
|
| | | public string OldPassword = Common.Config.Instance.Password;
|
| | | /// <summary>
|
| | | /// 新密码
|
| | | /// </summary>
|
| | | public string NewPassword = string.Empty;
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|