From ff3cfcf62632bf43e51a6b6098c203bf0f5cddbc Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 24 十二月 2019 19:53:29 +0800
Subject: [PATCH] 2019.12.24

---
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs |   87 ++++++++++++++++++++++++++++---------------
 1 files changed, 56 insertions(+), 31 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
index a400080..44d8fc4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
@@ -54,9 +54,7 @@
             btnEffect.TextColor = UserCenterColor.Current.TextGrayColor1;
             rowFinger.AddChidren(btnEffect, ChidrenBindMode.NotBind);
             //寮�鍏虫寜閽�
-            var btnFingerSwicth = rowFinger.AddMostRightEmptyIcon(104, 63);
-            btnFingerSwicth.UnSelectedImagePath = "Item/Switch.png";
-            btnFingerSwicth.SelectedImagePath = "Item/SwitchSelected.png";
+            var btnFingerSwicth = rowFinger.AddMostRightSwitchIcon();
             btnFingerSwicth.IsSelected = UserCenterResourse.Option.FingerprintAuthentication;
             //搴曠嚎
             rowFinger.AddBottomLine();
@@ -132,9 +130,7 @@
             btnUnLockByApp.TextColor = UserCenterColor.Current.TextGrayColor1;
             rowLock.AddChidren(btnUnLockByApp, ChidrenBindMode.NotBind);
             //寮�鍏虫寜閽�
-            var btnLockSwicth = rowLock.AddMostRightEmptyIcon(104, 63);
-            btnLockSwicth.UnSelectedImagePath = "Item/Switch.png";
-            btnLockSwicth.SelectedImagePath = "Item/SwitchSelected.png";
+            var btnLockSwicth = rowLock.AddMostRightSwitchIcon();
             //搴曠嚎
             rowLock.AddBottomLine();
             btnLockSwicth.IsSelected = UserCenterResourse.Option.DoorUnLockByRemote;
@@ -159,29 +155,64 @@
                     {
                         //寮�鍚寚绾归獙璇佸け璐ワ紒璇峰墠寰�鎵嬫満{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) =>
             {
-                var form = new Password.EditorSecondaryPasswordForm();
-                form.AddForm();
+                //濡傛灉娌℃湁瀵嗙爜楠岃瘉
+                if (string.IsNullOrEmpty(UserCenterResourse.Option.PswAuthentication) == true)
+                {
+                    //濡傛灉璁剧疆鏈夊叾浠栭獙璇佹柟寮�,鍒欓渶瑕侀獙璇�,鍚﹀垯鐩存帴璺宠繃楠岃瘉
+                    HdlCheckLogic.Current.CheckSecondarySecurity(
+                   () => { var form = new Password.EditorSecondaryPasswordForm(); form.AddForm(); },
+                   () => { var form = new Password.EditorSecondaryPasswordForm(); form.AddForm(); });
+                }
+                else
+                {
+                    var form = new Password.EditorSecondaryPasswordForm();
+                    form.AddForm();
+                }
             };
             //鎵嬪娍楠岃瘉
             rowGesture.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉娌℃湁鎵嬪娍楠岃瘉
+                if (string.IsNullOrEmpty(UserCenterResourse.Option.GestureAuthentication) == true)
+                {
+                    //濡傛灉璁剧疆鏈夊叾浠栭獙璇佹柟寮�,鍒欓渶瑕侀獙璇�,鍚﹀垯鐩存帴璺宠繃楠岃瘉
+                    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();
+                }
             };
             //杩滅▼寮�閿�
             btnLockSwicth.ButtonClickEvent += (sender, e) =>
@@ -219,19 +250,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
             {
@@ -289,10 +312,12 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
             //閲嶆柊鍒锋柊鐣岄潰
             this.InitMiddleFrame();
+
+            return 1;
         }
 
         #endregion

--
Gitblit v1.8.0