File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/GesturePswSecirityForm.cs |
| | |
| | | /// <summary>
|
| | | /// 手势密码验证界面
|
| | | /// </summary>
|
| | | public class GesturePswSecirityForm : DialogCommonForm
|
| | | public class PswGestureSecirityForm : DialogCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | |
| | | frameBack.Width = Application.GetRealWidth(965);
|
| | | frameBack.Height = Application.GetRealHeight(1486);
|
| | | frameBack.BackgroundColor = UserCenterColor.Current.White;
|
| | | frameBack.Radius = (uint)Application.GetMinRealAverage(6);
|
| | | frameBack.Radius = 6;
|
| | | bodyFrameLayout.AddChidren(frameBack);
|
| | |
|
| | |
|
| | |
|
| | | //手势验证控件
|
| | | var gestureControl = new PswGestureInputControl(i_GestureText);
|
| | | gestureControl.Y = Application.GetRealHeight(69);
|
| | | frameBack.AddChidren(gestureControl);
|
| | | gestureControl.InitControl();
|
| | | //添加关闭按钮
|
| | | var btnClose = gestureControl.AddCloseButton();
|
| | | btnClose.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | this.CloseForm();
|
| | | };
|
| | | gestureControl.FinishInputEvent += (Password, pswLeng) =>
|
| | | {
|
| | | if (UserCenterResourse.Option.GestureAuthentication != Password)
|
| | | {
|
| | | UserCenterResourse.Option.PasswordGestureInputCount--;
|
| | | if (UserCenterResourse.Option.PasswordGestureInputCount <= 0)
|
| | | {
|
| | | //管理员身份验证失败,请重新登录
|
| | | string msg2 = Language.StringByID(R.MyInternationalizationString.uCheckAdministratorFailAndReload);
|
| | | this.ShowMassage(ShowMsgType.Tip, msg2);
|
| | | UserCenterLogic.ReLoginAgain(Common.Config.Instance.Account);
|
| | | return;
|
| | | }
|
| | | //密码错误,请重新输入
|
| | | gestureControl.SetErrorMsg(Language.StringByID(R.MyInternationalizationString.uOldPsswordIsError));
|
| | | return;
|
| | | }
|
| | | //重置剩余密码次数
|
| | | UserCenterResourse.Option.ResetPasswordCount();
|
| | | //界面关闭
|
| | | this.CloseForm();
|
| | | SuccessAction?.Invoke();
|
| | | SuccessAction = null;
|
| | | };
|
| | |
|
| | | //Touch ID开锁
|
| | | var btnTouch = new NormalClickButton(frameBack.Width / 2, Application.GetRealHeight(127));
|
| | |
| | | //密码验证
|
| | | if (string.IsNullOrEmpty(UserCenterResourse.Option.PswAuthentication) == false)
|
| | | {
|
| | | var form = new SecondaryPswSecurityForm();
|
| | | var form = new PswSecondarySecurityForm();
|
| | | this.AddFromAndRemoveNowForm(form, i_TouchText, i_PasswordText, i_GestureText, SuccessAction);
|
| | | }
|
| | | //手势验证
|
| | | else if (string.IsNullOrEmpty(UserCenterResourse.Option.GestureAuthentication) == false)
|
| | | {
|
| | | var form = new GesturePswSecirityForm();
|
| | | var form = new PswGestureSecirityForm();
|
| | | this.AddFromAndRemoveNowForm(form, i_TouchText, i_PasswordText, i_GestureText, SuccessAction);
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | | btnPsw.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new SecondaryPswSecurityForm();
|
| | | var form = new PswSecondarySecurityForm();
|
| | | this.AddFromAndRemoveNowForm(form, i_TouchText, i_PasswordText, i_GestureText, SuccessAction);
|
| | | };
|
| | | }
|