| | |
| | | pswControl.SetErrorMsg(Language.StringByID(R.MyInternationalizationString.SecondPswNotEqual2));
|
| | | return;
|
| | | }
|
| | | UserCenterResourse.Option.PswAuthentication = i_Psw;
|
| | | UserCenterResourse.Option.Save();
|
| | | //关闭界面
|
| | | this.CloseForm();
|
| | | //保存密码
|
| | | this.SaveSecondaryPassword(pswControl, i_Psw);
|
| | | }
|
| | | else if (formMode == FormMode.A验证前回密码)
|
| | | {
|
| | |
| | | }
|
| | | else if (formMode == FormMode.A修改密码)
|
| | | {
|
| | | if (i_Psw == UserCenterResourse.Option.PswAuthentication)
|
| | | {
|
| | | //新密码和原密码一致,请重新输入
|
| | | pswControl.SetErrorMsg(Language.StringByID(R.MyInternationalizationString.uNewPswAndOldPswIsEqual));
|
| | | return;
|
| | | }
|
| | | //输入二次密码
|
| | | this.firstPssword = i_Psw;
|
| | | formMode = FormMode.A确认修改密码;
|
| | |
| | | pswControl.SetErrorMsg(Language.StringByID(R.MyInternationalizationString.SecondPswNotEqual2));
|
| | | return;
|
| | | }
|
| | | UserCenterResourse.Option.PswAuthentication = i_Psw;
|
| | | UserCenterResourse.Option.Save();
|
| | | //关闭界面
|
| | | this.CloseForm();
|
| | | //保存密码
|
| | | this.SaveSecondaryPassword(pswControl, i_Psw);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 保存密码___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 保存密码
|
| | | /// </summary>
|
| | | /// <param name="contr">控件</param>
|
| | | /// <param name="psw">密码</param>
|
| | | private void SaveSecondaryPassword(PswNumberInputControl contr, string psw)
|
| | | {
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | {
|
| | | //打开进度条
|
| | | this.ShowProgressBar();
|
| | | var pra = new
|
| | | {
|
| | | RequestVersion = Common.CommonPage.RequestVersion,
|
| | | LoginAccessToken = Common.Config.Instance.Token,
|
| | | GesturePwd = UserCenterResourse.Option.GestureAuthentication,
|
| | | StringPwd = psw
|
| | | };
|
| | | var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdatEexpandPwd", false, pra);
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | |
|
| | | if (result == false)
|
| | | {
|
| | | contr.SetErrorMsg(string.Empty);
|
| | | }
|
| | | else
|
| | | {
|
| | | UserCenterResourse.Option.PswAuthentication = psw;
|
| | | UserCenterResourse.Option.Save();
|
| | |
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //界面关闭
|
| | | this.CloseForm();
|
| | | });
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 结构体_____________________________
|
| | |
|
| | | /// <summary>
|