From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/Password/EditorGesturePasswordForm.cs | 69 ++++++++++++---------------------- 1 files changed, 24 insertions(+), 45 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorGesturePasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorGesturePasswordForm.cs index 9e7d205..ff80da1 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorGesturePasswordForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorGesturePasswordForm.cs @@ -30,12 +30,12 @@ public void ShowForm() { //鐣岄潰鍙冲垝涓嶅彲 - UserView.HomePage.Instance.ScrollEnabled = false; + this.ScrollEnabled = false; //璁剧疆澶撮儴淇℃伅 base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uGestureAuthentication)); - if (string.IsNullOrEmpty(UserCenterResourse.Option.GestureAuthentication) == false) + if (string.IsNullOrEmpty(HdlUserCenterResourse.AccountOption.GestureAuthentication) == false) { formMode = FormMode.A楠岃瘉鍓嶅洖瀵嗙爜; } @@ -103,8 +103,8 @@ form.AddForm(); }; //搴曠嚎 - int lineWidth = btnForgotPsw.GetRealWidthByText(12); - var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false); + int lineWidth = btnForgotPsw.GetRealWidthByText(); + var btnLine = new NormalViewControl(lineWidth, HdlControlResourse.BottomLineHeight, false); btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor; btnLine.Gravity = Gravity.CenterHorizontal; btnLine.Y = btnForgotPsw.Bottom - Application.GetRealHeight(8); @@ -151,15 +151,15 @@ } else if (formMode == FormMode.A楠岃瘉鍓嶅洖瀵嗙爜) { - if (UserCenterResourse.Option.GestureAuthentication != i_Psw) + if (HdlUserCenterResourse.AccountOption.GestureAuthentication != i_Psw) { - UserCenterResourse.Option.PasswordGestureInputCount--; - if (UserCenterResourse.Option.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; } //鎵嬪娍閿欒锛岃閲嶆柊杈撳叆 @@ -167,14 +167,14 @@ return; } //閲嶇疆鍓╀綑瀵嗙爜娆℃暟 - UserCenterResourse.Option.ResetPasswordCount(); + HdlUserCenterResourse.AccountOption.ResetPasswordCount(); formMode = FormMode.A淇敼瀵嗙爜; this.InitMiddleFrame(); } else if (formMode == FormMode.A淇敼瀵嗙爜) { - if (i_Psw == UserCenterResourse.Option.GestureAuthentication) + if (i_Psw == HdlUserCenterResourse.AccountOption.GestureAuthentication) { //鏂板瘑鐮佸拰鍘熷瘑鐮佷竴鑷达紝璇烽噸鏂拌緭鍏� pswControl.SetErrorMsg(Language.StringByID(R.MyInternationalizationString.uNewPswAndOldPswIsEqual)); @@ -229,52 +229,31 @@ /// <param name="psw">瀵嗙爜</param> private void SaveSecondaryPassword(PswGestureInputControl contr, string psw) { - HdlThreadLogic.Current.RunThread(async () => + HdlThreadLogic.Current.RunThread(() => { //鎵撳紑杩涘害鏉� this.ShowProgressBar(); - var pra = new - { - RequestVersion = Common.CommonPage.RequestVersion, - LoginAccessToken = Common.Config.Instance.Token, - GesturePwd = psw, - StringPwd = UserCenterResourse.Option.PswAuthentication - }; - var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdatEexpandPwd", false, pra); + + var result = HdlAccountLogic.Current.EditorNumberAndGesturePassword(null, psw); //鍏抽棴杩涘害鏉� this.CloseProgressBar(); - if (result == false) + HdlThreadLogic.Current.RunMain(() => { - contr.SetErrorMsg(string.Empty); - } - else - { - UserCenterResourse.Option.GestureAuthentication = psw; - UserCenterResourse.Option.Save(); - - HdlThreadLogic.Current.RunMain(() => + if (result == false) { + //淇敼瀵嗙爜澶辫触 + contr.SetErrorMsg(Language.StringByID(R.MyInternationalizationString.uEditorPasswordFail)); + } + else + { + HdlUserCenterResourse.AccountOption.GestureAuthentication = psw; + HdlUserCenterResourse.AccountOption.Save(); //鐣岄潰鍏抽棴 this.CloseForm(); - }); - } + } + }); }); - } - - #endregion - - #region 鈻� 鐣岄潰鍏抽棴___________________________ - - /// <summary> - /// 鐣岄潰鍏抽棴 - /// </summary> - public override void CloseFormBefore() - { - //鐣岄潰鍙冲垝鍙� - UserView.HomePage.Instance.ScrollEnabled = true; - - base.CloseFormBefore(); } #endregion -- Gitblit v1.8.0