File was renamed from ZigbeeApp/Shared/Phone/UserCenter/Safety/EdtiorUserPasswordForm.cs |
| | |
| | | namespace Shared.Phone.UserCenter.Safety
|
| | | {
|
| | | /// <summary>
|
| | | /// 修改用户密码的画面
|
| | | /// 新建用户密码的画面
|
| | | /// </summary>
|
| | | public class EdtiorUserPasswordForm : EditorCommonForm
|
| | | public class PasswordAddNewForm : EditorCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | |
| | | base.SetTitleText(i_titleText);
|
| | |
|
| | | //初始化中部信息
|
| | | this.InitMiddleFrame();
|
| | | this.InitMiddleFrame(i_titleText);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化中部信息
|
| | | /// </summary>
|
| | | private void InitMiddleFrame()
|
| | | /// <param name="i_titleText">头部标题信息</param>
|
| | | private void InitMiddleFrame(string i_titleText)
|
| | | {
|
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //请输入新安防密码
|
| | | pswControl = new PswNumberInputControl(Language.StringByID(R.MyInternationalizationString.uPleaseInputNewSafetyPassword), 4);
|
| | | pswControl.NumberIconBackColor = UserCenterColor.Current.White;
|
| | | pswControl.Gravity = Gravity.CenterHorizontal;
|
| | | pswControl.Y = Application.GetRealHeight(102);
|
| | | bodyFrameLayout.AddChidren(pswControl);
|
| | | pswControl.InitControl();
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | | //执行修改用户密码
|
| | | this.ChangedAdminPassword(firstPsw, pssword);
|
| | | this.ChangedAdminPassword(firstPsw, i_titleText);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | /// 执行修改用户密码
|
| | | /// </summary>
|
| | | /// <param name="pswValue1">新密码</param>
|
| | | /// <param name="pswValue2">确认密码</param>
|
| | | private async void ChangedAdminPassword(string pswValue1, string pswValue2)
|
| | | private async void ChangedAdminPassword(string pswValue1, string i_titleText)
|
| | | {
|
| | | //执行修改
|
| | | bool result = await HdlSafeguardLogic.Current.ChangedUserPassword(this.pswNo, pswValue1);
|
| | | bool result = await HdlSafeguardLogic.Current.ChangedUserPassword(this.pswNo, pswValue1, string.Empty);
|
| | | if (result == false)
|
| | | {
|
| | | firstPsw = string.Empty;
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | //用户密码已更新
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uUserPasswordRefreshMsg);
|
| | | //安防密码设置成功
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uSetSafetyPasswordSuccess);
|
| | | this.ShowMassage(ShowMsgType.Tip, msg);
|
| | |
|
| | | //界面直接关闭(暂时)
|
| | | //界面直接关闭
|
| | | this.CloseForm();
|
| | | //关闭编辑界面
|
| | | this.CloseFormByFormName("PasswordUserEditorForm");
|
| | |
|
| | | var form = new PasswordUserEditorForm();
|
| | | form.AddForm(this.pswNo, pswValue1, i_titleText);
|
| | | }
|
| | |
|
| | | #endregion
|