lss
2020-06-12 9c16d3614d9b88c637f967518a329f239fcd3aaf
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/PswSecondarySecurityForm.cs
@@ -43,7 +43,7 @@
            frameBack.Width = Application.GetRealWidth(965);
            frameBack.Height = Application.GetRealHeight(1711);
            frameBack.BackgroundColor = UserCenterColor.Current.White;
            frameBack.Radius = 6;
            frameBack.Radius = (uint)Application.GetRealHeight(17);
            bodyFrameLayout.AddChidren(frameBack);
            //密码输入控件
@@ -62,10 +62,10 @@
            };
            pswControl.FinishInputEvent += (strPsw) =>
            {
                if (UserCenterResourse.Option.PswAuthentication != strPsw)
                if (UserCenterResourse.AccountOption.PswAuthentication != strPsw)
                {
                    UserCenterResourse.Option.PasswordInputCount--;
                    if (UserCenterResourse.Option.PasswordInputCount <= 0)
                    UserCenterResourse.AccountOption.PasswordInputCount--;
                    if (UserCenterResourse.AccountOption.PasswordInputCount <= 0)
                    {
                        //管理员身份验证失败,请重新登录
                        string msg2 = Language.StringByID(R.MyInternationalizationString.uCheckAdministratorFailAndReload);
@@ -75,11 +75,10 @@
                    }
                    //密码错误,请重新输入
                    pswControl.SetErrorMsg(Language.StringByID(R.MyInternationalizationString.uOldPsswordIsError));
                    pswControl.ResetControlInfo(i_PasswordText, false);
                    return;
                }
                //重置剩余密码次数
                UserCenterResourse.Option.ResetPasswordCount();
                UserCenterResourse.AccountOption.ResetPasswordCount();
                //界面关闭
                this.CloseForm();
                SuccessAction?.Invoke();
@@ -87,14 +86,10 @@
            };
            //手势开锁
            var btnGesture = new NormalClickButton(frameBack.Width / 2, Application.GetRealHeight(127));
            btnGesture.oldBackgroundColor = 0xfff5f6fa;
            btnGesture.BackgroundColor = 0xfff5f6fa;
            btnGesture.Text = i_GestureText;
            btnGesture.TextColor = UserCenterColor.Current.TextColor1;
            btnGesture.Gravity = Gravity.BottomLeft;
            var btnGesture = new BottomLeftClickButton(frameBack.Width / 2, Application.GetRealHeight(127));
            frameBack.AddChidren(btnGesture);
            if (string.IsNullOrEmpty(UserCenterResourse.Option.GestureAuthentication) == true)
            btnGesture.InitControl(i_GestureText);
            if (string.IsNullOrEmpty(UserCenterResourse.AccountOption.GestureAuthentication) == true)
            {
                //没有启用手势开锁
                btnGesture.CanClick = false;
@@ -107,14 +102,10 @@
            };
            //Touch ID开锁
            var btnTouch = new NormalClickButton(frameBack.Width / 2, Application.GetRealHeight(127));
            btnTouch.BackgroundColor = 0xff232323;
            btnTouch.oldBackgroundColor = 0xff232323;
            btnTouch.Text = i_TouchText;
            btnTouch.TextColor = UserCenterColor.Current.White;
            btnTouch.Gravity = Gravity.BottomRight;
            var btnTouch = new BottomRightClickButton(frameBack.Width - btnGesture.Width, btnGesture.Height);
            frameBack.AddChidren(btnTouch);
            if (UserCenterResourse.Option.FingerprintAuthentication == false)
            btnTouch.InitControl(i_TouchText);
            if (UserCenterResourse.AccountOption.FingerprintAuthentication == false)
            {
                //没有启用Touch ID
                btnTouch.CanClick = false;
@@ -147,13 +138,13 @@
                        TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = null;
                        //密码验证
                        if (string.IsNullOrEmpty(UserCenterResourse.Option.PswAuthentication) == false)
                        if (string.IsNullOrEmpty(UserCenterResourse.AccountOption.PswAuthentication) == false)
                        {
                            var form = new PswSecondarySecurityForm();
                            this.AddFromAndRemoveNowForm(form, i_TouchText, i_PasswordText, i_GestureText, SuccessAction);
                        }
                        //手势验证
                        else if (string.IsNullOrEmpty(UserCenterResourse.Option.GestureAuthentication) == false)
                        else if (string.IsNullOrEmpty(UserCenterResourse.AccountOption.GestureAuthentication) == false)
                        {
                            var form = new PswGestureSecirityForm();
                            this.AddFromAndRemoveNowForm(form, i_TouchText, i_PasswordText, i_GestureText, SuccessAction);
@@ -173,12 +164,12 @@
        #region ■ 界面关闭___________________________
        public override void CloseForm()
        public override void CloseFormBefore()
        {
            //取消事件
            TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = null;
            base.CloseForm();
            base.CloseFormBefore();
        }
        #endregion