From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28

---
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs |  109 +++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 83 insertions(+), 26 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
index 705fdbd..b438cb5 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
@@ -90,13 +90,18 @@
             }
 
             //浜屾瀹夊叏楠岃瘉灏嗙敤浜庝笅鍒楁搷浣�
-            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);
@@ -155,19 +160,30 @@
                     {
                         //寮�鍚寚绾归獙璇佸け璐ワ紒璇峰墠寰�鎵嬫満{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;
                     }
+                    //灏員ouch ID鐢ㄤ簬銆孼igBee銆峽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) =>
@@ -194,11 +210,13 @@
                 {
                     //濡傛灉璁剧疆鏈夊叾浠栭獙璇佹柟寮�,鍒欓渶瑕侀獙璇�,鍚﹀垯鐩存帴璺宠繃楠岃瘉
                     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();
                 }
             };
             //杩滅▼寮�閿�
@@ -237,19 +255,11 @@
                     this.ShowMassage(ShowMsgType.Normal, msg);
                     return;
                 }
-                //灏員ouch ID鐢ㄤ簬銆孼igBee銆峽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
             {
@@ -316,5 +326,52 @@
         }
 
         #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
     }
 }

--
Gitblit v1.8.0