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/EditorAccountPasswordForm.cs | 51 ++++++++++++--------------------------------------- 1 files changed, 12 insertions(+), 39 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorAccountPasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorAccountPasswordForm.cs index f788e5f..02831e2 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorAccountPasswordForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorAccountPasswordForm.cs @@ -50,7 +50,7 @@ rowOldPsw.Y = Application.GetRealHeight(26); frameBackGroud.AddChidren(rowOldPsw); var txtoldPsw = new TextInputControl(Application.GetRealWidth(800), rowOldPsw.Height); - txtoldPsw.X = ControlCommonResourse.XXLeft; + txtoldPsw.X = HdlControlResourse.XXLeft; txtoldPsw.SecureTextEntry = true; txtoldPsw.PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputOldPsw); rowOldPsw.AddChidren(txtoldPsw); @@ -76,7 +76,7 @@ btnForgotPsw.TextID = R.MyInternationalizationString.ForgotPasswordMsg; btnForgotPsw.TextAlignment = TextAlignment.CenterRight; frameBackGroud.AddChidren(btnForgotPsw); - btnForgotPsw.X = bodyFrameLayout.Width - ControlCommonResourse.XXLeft - btnForgotPsw.Width; + btnForgotPsw.X = bodyFrameLayout.Width - HdlControlResourse.XXLeft - btnForgotPsw.Width; btnForgotPsw.ButtonClickEvent += (sender, e) => { var form = new ForgotAccountPasswordForm(); @@ -90,7 +90,7 @@ rowNewPsw.Y = Application.GetRealHeight(236); frameBackGroud.AddChidren(rowNewPsw); var txtNewPsw = new TextInputControl(Application.GetRealWidth(800), rowNewPsw.Height); - txtNewPsw.X = ControlCommonResourse.XXLeft; + txtNewPsw.X = HdlControlResourse.XXLeft; txtNewPsw.SecureTextEntry = true; txtNewPsw.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputNewPassword); rowNewPsw.AddChidren(txtNewPsw); @@ -115,7 +115,7 @@ rowConfirmPsw.Y = rowNewPsw.Bottom + Application.GetRealHeight(10); frameBackGroud.AddChidren(rowConfirmPsw); var txtConfirmPsw = new TextInputControl(Application.GetRealWidth(800), rowConfirmPsw.Height); - txtConfirmPsw.X = ControlCommonResourse.XXLeft; + txtConfirmPsw.X = HdlControlResourse.XXLeft; txtConfirmPsw.SecureTextEntry = true; txtConfirmPsw.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseRepeatInputNewPassword); rowConfirmPsw.AddChidren(txtConfirmPsw); @@ -152,7 +152,7 @@ return; } //淇濆瓨瀵嗙爜 - this.SavePassword(txtConfirmPsw.Text); + this.SavePassword(txtoldPsw.Text, txtConfirmPsw.Text); }; } @@ -163,15 +163,13 @@ /// <summary> /// 淇濆瓨瀵嗙爜 /// </summary> - /// <param name="newPassword"></param> - private async void SavePassword(string newPassword) + /// <param name="i_oldPsw"></param> + /// <param name="i_newPsw"></param> + private void SavePassword(string i_oldPsw, string i_newPsw) { - var pra = new SavePasswordPra(); - pra.NewPassword = newPassword; - - //鏇存敼瀵嗙爜 - bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdatePassword", false, pra); - if (flage == false) + //缂栬緫瀵嗙爜 + var result = HdlAccountLogic.Current.EditorPassword(i_oldPsw, i_newPsw); + if (result == false) { return; } @@ -180,7 +178,7 @@ this.ShowMassage(ShowMsgType.Remind, msg, () => { //浠庢柊鐧诲綍 - UserCenterLogic.ReLoginAgain(Common.Config.Instance.Account); + HdlAccountLogic.Current.ReLoginAgain(Common.Config.Instance.Account); }, Language.StringByID(R.MyInternationalizationString.Login)); } @@ -215,12 +213,6 @@ 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) { //纭瀵嗙爜涓嶄竴鑷达紝璇烽噸鏂拌緭鍏� @@ -246,25 +238,6 @@ } return true; - } - - #endregion - - #region 鈻� 缁撴瀯浣揰____________________________ - - /// <summary> - /// 淇濆瓨瀵嗙爜鐨勫惎鍔ㄥ弬鏁扮被 - /// </summary> - private class SavePasswordPra - { - /// <summary> - /// 鏃у瘑鐮� - /// </summary> - public string OldPassword = Common.Config.Instance.Password; - /// <summary> - /// 鏂板瘑鐮� - /// </summary> - public string NewPassword = string.Empty; } #endregion -- Gitblit v1.8.0