| | |
| | | //设置头部信息
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uGestureAuthentication));
|
| | |
|
| | | if (string.IsNullOrEmpty(UserCenterResourse.AccountOption.GestureAuthentication) == false)
|
| | | if (string.IsNullOrEmpty(HdlUserCenterResourse.AccountOption.GestureAuthentication) == false)
|
| | | {
|
| | | formMode = FormMode.A验证前回密码;
|
| | | }
|
| | |
| | | };
|
| | | //底线
|
| | | int lineWidth = btnForgotPsw.GetRealWidthByText();
|
| | | var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
|
| | | var btnLine = new NormalViewControl(lineWidth, HdlControlResourse.BottomLineHeight, false);
|
| | | btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
|
| | | btnLine.Gravity = Gravity.CenterHorizontal;
|
| | | btnLine.Y = btnForgotPsw.Bottom - Application.GetRealHeight(8);
|
| | |
| | | }
|
| | | else if (formMode == FormMode.A验证前回密码)
|
| | | {
|
| | | if (UserCenterResourse.AccountOption.GestureAuthentication != i_Psw)
|
| | | if (HdlUserCenterResourse.AccountOption.GestureAuthentication != i_Psw)
|
| | | {
|
| | | UserCenterResourse.AccountOption.PasswordGestureInputCount--;
|
| | | if (UserCenterResourse.AccountOption.PasswordGestureInputCount <= 0)
|
| | | HdlUserCenterResourse.AccountOption.PasswordGestureInputCount--;
|
| | | if (HdlUserCenterResourse.AccountOption.PasswordGestureInputCount <= 0)
|
| | | {
|
| | | //管理员身份验证失败,请重新登录
|
| | | string msg2 = Language.StringByID(R.MyInternationalizationString.uCheckAdministratorFailAndReload);
|
| | | this.ShowMassage(ShowMsgType.Tip, msg2);
|
| | | UserCenterLogic.ReLoginAgain(Common.Config.Instance.Account);
|
| | | HdlAccountLogic.Current.ReLoginAgain(Common.Config.Instance.Account);
|
| | | return;
|
| | | }
|
| | | //手势错误,请重新输入
|
| | |
| | | return;
|
| | | }
|
| | | //重置剩余密码次数
|
| | | UserCenterResourse.AccountOption.ResetPasswordCount();
|
| | | HdlUserCenterResourse.AccountOption.ResetPasswordCount();
|
| | |
|
| | | formMode = FormMode.A修改密码;
|
| | | this.InitMiddleFrame();
|
| | | }
|
| | | else if (formMode == FormMode.A修改密码)
|
| | | {
|
| | | if (i_Psw == UserCenterResourse.AccountOption.GestureAuthentication)
|
| | | if (i_Psw == HdlUserCenterResourse.AccountOption.GestureAuthentication)
|
| | | {
|
| | | //新密码和原密码一致,请重新输入
|
| | | pswControl.SetErrorMsg(Language.StringByID(R.MyInternationalizationString.uNewPswAndOldPswIsEqual));
|
| | |
| | | {
|
| | | //打开进度条
|
| | | this.ShowProgressBar();
|
| | | var pra = new
|
| | | {
|
| | | RequestVersion = Common.CommonPage.RequestVersion,
|
| | | LoginAccessToken = Common.Config.Instance.Token,
|
| | | GesturePwd = psw,
|
| | | StringPwd = UserCenterResourse.AccountOption.PswAuthentication
|
| | | };
|
| | | var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdatEexpandPwd", false, pra);
|
| | |
|
| | | var result = HdlAccountLogic.Current.EditorNumberAndGesturePassword(null, psw);
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | |
|
| | |
| | | {
|
| | | if (result == false)
|
| | | {
|
| | | contr.SetErrorMsg(string.Empty);
|
| | | //修改密码失败
|
| | | contr.SetErrorMsg(Language.StringByID(R.MyInternationalizationString.uEditorPasswordFail));
|
| | | }
|
| | | else
|
| | | {
|
| | | UserCenterResourse.AccountOption.GestureAuthentication = psw;
|
| | | UserCenterResourse.AccountOption.Save();
|
| | | HdlUserCenterResourse.AccountOption.GestureAuthentication = psw;
|
| | | HdlUserCenterResourse.AccountOption.Save();
|
| | | //界面关闭
|
| | | this.CloseForm();
|
| | | }
|