| | |
| | | }
|
| | |
|
| | | //二次安全验证将用于下列操作
|
| | | var btnTitle = new NormalViewControl(800, 49, true);
|
| | | var btnTitle = new NormalViewControl(800, 50, true);
|
| | | btnTitle.X = ControlCommonResourse.XXLeft;
|
| | | btnTitle.Y = frameTop.Bottom + Application.GetRealHeight(35);
|
| | | btnTitle.Y = frameTop.Bottom + Application.GetRealHeight(34);
|
| | | btnTitle.TextSize = 12;
|
| | | btnTitle.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnTitle.TextID = R.MyInternationalizationString.uSecondarySecurityWillBeUsedForTheFollowingOperations;
|
| | | bodyFrameLayout.AddChidren(btnTitle);
|
| | | btnTitle.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //隐匿功能点击
|
| | | this.HideOptionClick(btnTitle);
|
| | | };
|
| | |
|
| | | var frameButtom = new FrameListControl(12);
|
| | | frameButtom.Y = btnTitle.Bottom + Application.GetRealHeight(23);
|
| | |
| | | {
|
| | | //开启指纹验证失败!请前往手机{0}设置开启指纹开锁验证
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uUseFingerprintAuthenticationFailMsg);
|
| | | if (msg.Contains("{0}") == true)
|
| | | {
|
| | | msg = string.Format(msg, "\r\n");
|
| | | }
|
| | | msg = msg.Replace("{0}", "\r\n");
|
| | | this.ShowMassage(ShowMsgType.Normal, msg);
|
| | | return;
|
| | | }
|
| | | //将Touch ID用于「ZigBee」{0}更改安防设置和开启门锁时使用
|
| | | string msg2 = Language.StringByID(R.MyInternationalizationString.uUseFingerprintAuthenticationMsg);
|
| | | msg2 = msg2.Replace("{0}", "\r\n");
|
| | | this.ShowMassage(ShowMsgType.Confirm, msg2, () =>
|
| | | {
|
| | | //如果设置有安全验证,想要修改它,必须先通过安全验证
|
| | | //如果没有设置有安全验证,则无需验证
|
| | | HdlCheckLogic.Current.CheckSecondarySecurity(
|
| | | () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); },//处理指纹验证
|
| | | () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); });//处理指纹验证
|
| | | });
|
| | | }
|
| | | //如果设置有安全验证,想要修改它,必须先通过安全验证
|
| | | //如果没有设置有安全验证,则无需验证
|
| | | HdlCheckLogic.Current.CheckSecondarySecurity(
|
| | | () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); },//处理指纹验证
|
| | | () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); });//处理指纹验证
|
| | | else
|
| | | {
|
| | | //如果设置有安全验证,想要修改它,必须先通过安全验证
|
| | | //如果没有设置有安全验证,则无需验证
|
| | | HdlCheckLogic.Current.CheckSecondarySecurity(
|
| | | () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); },//处理指纹验证
|
| | | () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); });//处理指纹验证
|
| | | }
|
| | | };
|
| | | //密码验证
|
| | | rowPsw.ButtonClickEvent += (sender, e) =>
|
| | |
| | | {
|
| | | //如果设置有其他验证方式,则需要验证,否则直接跳过验证
|
| | | HdlCheckLogic.Current.CheckSecondarySecurity(
|
| | | () => { },
|
| | | () => { });
|
| | | () => { var form = new Password.EditorGesturePasswordForm(); form.AddForm(); },
|
| | | () => { var form = new Password.EditorGesturePasswordForm(); form.AddForm(); });
|
| | | }
|
| | | else
|
| | | {
|
| | | var form = new Password.EditorGesturePasswordForm();
|
| | | form.AddForm();
|
| | | }
|
| | | };
|
| | | //远程开锁
|
| | |
| | | this.ShowMassage(ShowMsgType.Normal, msg);
|
| | | return;
|
| | | }
|
| | | //将Touch ID用于「ZigBee」{0}更改安防设置和开启门锁时使用
|
| | | string msg2 = Language.StringByID(R.MyInternationalizationString.uUseFingerprintAuthenticationMsg);
|
| | | if (msg2.Contains("{0}") == true)
|
| | | {
|
| | | msg2 = string.Format(msg2, "\r\n");
|
| | | }
|
| | | this.ShowMassage(ShowMsgType.Confirm, msg2, () =>
|
| | | {
|
| | | UserCenterResourse.Option.FingerprintAuthentication = !btnFingerSwicth.IsSelected;
|
| | | UserCenterResourse.Option.Save();
|
| | | //重新刷新界面
|
| | | this.InitMiddleFrame();
|
| | | });
|
| | |
|
| | | UserCenterResourse.Option.FingerprintAuthentication = !btnFingerSwicth.IsSelected;
|
| | | UserCenterResourse.Option.Save();
|
| | | //重新刷新界面
|
| | | this.InitMiddleFrame();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 隐匿功能___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 点击合计
|
| | | /// </summary>
|
| | | private int clickCount = 0;
|
| | | /// <summary>
|
| | | /// 点击的那瞬间的时间
|
| | | /// </summary>
|
| | | private DateTime clickTime;
|
| | | /// <summary>
|
| | | /// 隐匿功能
|
| | | /// </summary>
|
| | | private void HideOptionClick(NormalViewControl btnTitle)
|
| | | {
|
| | | if (clickCount == 0)
|
| | | {
|
| | | clickTime = DateTime.Now;
|
| | | }
|
| | | clickCount++;
|
| | | if (clickCount >= 10)
|
| | | {
|
| | | if ((DateTime.Now - clickTime).TotalSeconds > 3)
|
| | | {
|
| | | clickCount = 0;
|
| | | return;
|
| | | }
|
| | | btnTitle.CanClick = false;
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | {
|
| | | this.ShowProgressBar();
|
| | | var result = await HdlBackupLogic.Current.LoadHideOption();
|
| | | this.CloseProgressBar();
|
| | | if (result == true)
|
| | | {
|
| | | this.ShowMassage(ShowMsgType.Tip, "刷新隐匿配置成功");
|
| | | }
|
| | | else
|
| | | {
|
| | | this.ShowMassage(ShowMsgType.Tip, "刷新隐匿配置失败");
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|