From eda3fb873e59544ff36301b51e05aef64f87b0f9 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 27 八月 2021 13:21:21 +0800
Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into newBranch1

---
 HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs |  461 ++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 343 insertions(+), 118 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs
index 204bf93..6eb3d6b 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs
@@ -8,6 +8,16 @@
     {
         #region 鎺т欢鍒楄〃
         FrameLayout bodyView;
+
+        /// <summary>
+        /// 涓婇儴鍒嗘樉绀哄尯鍩�
+        /// </summary>
+        FrameLayout topContentView;
+        /// <summary>
+        /// 瑙i攣椤甸潰閫夋嫨鍒楄〃view
+        /// </summary>
+        HorizontalScrolViewLayout optionView;
+
         /// <summary>
         /// 鏃犱繚鎶ら�夐」鎻愮ず
         /// </summary>
@@ -36,19 +46,19 @@
         /// </summary>
         Button btnStartupBg;
 
-
-        /// <summary>
-        /// 璁剧疆瀹夐槻閫夐」鎻愮ず
-        /// </summary>
-        Button btnSecuritySelectionTip;
-        /// <summary>
-        /// 璁剧疆瀹夐槻閫夐」閫変腑鍥炬爣
-        /// </summary>
-        Button btnSecuritySelectionIcon;
-        /// <summary>
-        /// 璁剧疆瀹夐槻閫夐」鑳屾櫙
-        /// </summary>
-        Button btnSecurityBg;
+        #region F3闃舵
+        ///// <summary>
+        ///// 璁剧疆瀹夐槻閫夐」鎻愮ず
+        ///// </summary>
+        //Button btnSecuritySelectionTip;
+        ///// <summary>
+        ///// 璁剧疆瀹夐槻閫夐」閫変腑鍥炬爣
+        ///// </summary>
+        //Button btnSecuritySelectionIcon;
+        ///// <summary>
+        ///// 璁剧疆瀹夐槻閫夐」鑳屾櫙
+        ///// </summary>
+        //Button btnSecurityBg;
 
 
         /// <summary>
@@ -63,6 +73,7 @@
         /// 璁剧疆闂ㄩ攣閫夐」鑳屾櫙
         /// </summary>
         Button btnDoorlockBg;
+        #endregion
 
         /// <summary>
         /// 瀵嗙爜浣跨敤閫夋嫨鐨勮缁嗗唴瀹规彁绀�
@@ -70,13 +81,62 @@
         Button btnTipMsg;
 
         /// <summary>
+        /// 瑙i攣鏂瑰紡鍖哄煙view
+        /// </summary>
+        VerticalScrolViewLayout unlockOptionView;
+
+        /// <summary>
         /// 瀵嗙爜璁剧疆鏂囨湰
         /// 浜嬩欢璺宠浆鎸夐挳
         /// </summary>
         Button btnPasswordUnlockTitle;
+        /// <summary>
+        /// 淇敼瀵嗙爜鏂囨湰
+        /// 浜嬩欢璺宠浆鎸夐挳
+        /// </summary>
+        Button btnResetPasswordTitle;
+
+        /// <summary>
+        /// 鎵嬪娍璁剧疆鏂囨湰
+        /// 浜嬩欢璺宠浆鎸夐挳
+        /// </summary>
+        Button btnGestureUnlockTitle;
+        /// <summary>
+        /// 淇敼鎵嬪娍瀵嗙爜
+        /// 浜嬩欢璺宠浆鎸夐挳
+        /// </summary>
+        Button btnResetGestureTitle;
+
+        /// <summary>
+        /// 鎸囩汗璁剧疆鏂囨湰
+        /// 浜嬩欢璺宠浆鎸夐挳
+        /// </summary>
+        Button btnFingerprintUnlockSwtichIcon;
+        /// <summary>
+        /// 闈㈠ID璁剧疆鏂囨湰
+        /// 浜嬩欢璺宠浆鎸夐挳
+        /// </summary>
+        Button btnFaceIdUnlockSwtichIcon;
 
 
+        /// <summary>
+        /// 鎸囩汗瑙i攣鏂瑰紡Row
+        /// </summary>
+        FrameLayout fingerprintUnlockDiv;
+        /// <summary>
+        /// 闈㈠瑙i攣鏂瑰紡Row
+        /// </summary>
+        FrameLayout faceIdUnlockDiv;
         #endregion
+
+        /// <summary>
+        /// 鏄惁鏀寔鎸囩汗瑙i攣
+        /// </summary>
+        bool sTouchID = false;
+        /// <summary>
+        /// 鏄惁鏀寔闈㈠瑙i攣
+        /// </summary>
+        bool sFaceID = false;
 
         public AppUnlockSettingsPage()
         {
@@ -86,9 +146,17 @@
         public void LoadPage()
         {
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
-            new TopViewDiv(bodyView, Language.StringByID(StringId.InterpretationSettings)).LoadTopView();
+            //濡傛灉鐢ㄦ埛閰嶇疆浜嗛渶瑕佽В閿佺殑鐣岄潰浣嗘槸娌℃湁璁剧疆瀵嗙爜锛屽垯鍦ㄨ繑鍥炴椂娓呯┖闇�瑕佽В閿佺殑鐣岄潰
+            Action action = () => {
+                if(UserInfo.Current.appUnlockPage.Count > 0&& UserInfo.Current.appUnlockPasswrod == "")
+                {
+                    UserInfo.Current.appUnlockPage = new System.Collections.Generic.List<string>();
+                    UserInfo.Current.SaveUserInfo();
+                }
+            };
+            new TopViewDiv(bodyView, Language.StringByID(StringId.InterpretationSettings)).LoadTopView(action);
 
-            FrameLayout topContentView = new FrameLayout()
+            topContentView = new FrameLayout()
             {
                 Y = Application.GetRealHeight(64),
                 Height = Application.GetRealWidth(332),
@@ -98,7 +166,7 @@
 
             Button btnTip1 = new Button()
             {
-                Y = Application.GetRealHeight( 8),
+                Y = Application.GetRealHeight(8),
                 Height = Application.GetRealHeight(30),
                 TextAlignment = TextAlignment.Center,
                 IsBold = true,
@@ -118,19 +186,24 @@
                 TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                 BackgroundColor = CSS_Color.MainBackgroundColor,
                 TextID = StringId.MultipleChoicesOfPagesYouNeedToProtect,
+                IsMoreLines = true,
             };
             topContentView.AddChidren(btnTip2);
-
-
-            var optionView = new HorizontalScrolViewLayout()
+            if(Language.CurrentLanguage == "Engligh")
             {
-                Y = Application.GetRealWidth(143-64),
+                btnTip2.Height = Application.GetRealHeight(30);
+            }
+
+
+            optionView = new HorizontalScrolViewLayout()
+            {
+                Y = Application.GetRealWidth(143 - 64),
                 Height = Application.GetRealWidth(209),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
             };
             topContentView.AddChidren(optionView);
 
-            LoadView_OptionView(optionView);
+            LoadView_OptionView();
 
             btnTipMsg = new Button()
             {
@@ -145,22 +218,24 @@
                 BorderWidth = 1,
                 Radius = 1,
                 TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
-                Visible = false,
+                TextID = StringId.UnprotectedTipMsg,
             };
             topContentView.AddChidren(btnTipMsg);
+            if (Language.CurrentLanguage == "Engligh")
+            {
+                btnTip2.Height = Application.GetRealHeight(40);
+                topContentView.Height = Application.GetRealHeight(360);
+            }
 
             LoadEventList();
 
-            if(MainPage.LoginUser.appUnlock.Count!=0)
-            {
-                LoadView_UnlockView();
-            }
+            LoadView_UnlockView();
 
         }
         /// <summary>
         /// 鍔犺浇閫夐」鍗�
         /// </summary>
-        void LoadView_OptionView(HorizontalScrolViewLayout optionView)
+        void LoadView_OptionView()
         {
             #region Unprotected
             optionView.AddChidren(new Button() { Width = Application.GetRealWidth(24) });
@@ -248,48 +323,48 @@
             startupDiv.AddChidren(btnStartupSelectionTip);
             #endregion
 
-
+            #region F3闃舵
             #region Security
-            optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) });
+            //optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) });
 
-            FrameLayout securityDiv = new FrameLayout()
-            {
-                Width = Application.GetRealWidth(94),
-            };
-            optionView.AddChidren(securityDiv);
+            //FrameLayout securityDiv = new FrameLayout()
+            //{
+            //    Width = Application.GetRealWidth(94),
+            //};
+            //optionView.AddChidren(securityDiv);
 
-            btnSecurityBg = new Button()
-            {
-                Height = Application.GetRealWidth(174),
-                UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/3.png",
-                SelectedImagePath = "PersonalCenter/AppUnlockSetting/3On.png"
-            };
-            securityDiv.AddChidren(btnSecurityBg);
+            //btnSecurityBg = new Button()
+            //{
+            //    Height = Application.GetRealWidth(174),
+            //    UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/3.png",
+            //    SelectedImagePath = "PersonalCenter/AppUnlockSetting/3On.png"
+            //};
+            //securityDiv.AddChidren(btnSecurityBg);
 
-            btnSecuritySelectionIcon = new Button()
-            {
-                X = Application.GetRealWidth(5),
-                Y = Application.GetRealWidth(174),
-                Width = Application.GetRealWidth(30),
-                Height = Application.GetRealWidth(30),
-                UnSelectedImagePath = "Public/ChooseIcon.png",
-                SelectedImagePath = "Public/ChooseOnIcon.png",
-            };
-            securityDiv.AddChidren(btnSecuritySelectionIcon);
+            //btnSecuritySelectionIcon = new Button()
+            //{
+            //    X = Application.GetRealWidth(5),
+            //    Y = Application.GetRealWidth(174),
+            //    Width = Application.GetRealWidth(30),
+            //    Height = Application.GetRealWidth(30),
+            //    UnSelectedImagePath = "Public/ChooseIcon.png",
+            //    SelectedImagePath = "Public/ChooseOnIcon.png",
+            //};
+            //securityDiv.AddChidren(btnSecuritySelectionIcon);
 
-            btnSecuritySelectionTip = new Button()
-            {
-                X = Application.GetRealWidth(30),
-                Y = Application.GetRealWidth(174),
-                Width = Application.GetRealWidth(74),
-                Height = Application.GetRealWidth(30),
-                TextID = StringId.DefenseAndUndefense,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextColor = CSS_Color.FirstLevelTitleColor,
-                SelectedTextColor = CSS_Color.MainColor,
-                TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel
-            };
-            securityDiv.AddChidren(btnSecuritySelectionTip);
+            //btnSecuritySelectionTip = new Button()
+            //{
+            //    X = Application.GetRealWidth(30),
+            //    Y = Application.GetRealWidth(174),
+            //    Width = Application.GetRealWidth(74),
+            //    Height = Application.GetRealWidth(30),
+            //    TextID = StringId.DefenseAndUndefense,
+            //    TextAlignment = TextAlignment.CenterLeft,
+            //    TextColor = CSS_Color.FirstLevelTitleColor,
+            //    SelectedTextColor = CSS_Color.MainColor,
+            //    TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel
+            //};
+            //securityDiv.AddChidren(btnSecuritySelectionTip);
             #endregion
 
 
@@ -335,6 +410,7 @@
             };
             doorlockDiv.AddChidren(btnDoorlockSelectionTip);
             #endregion
+            #endregion
 
             optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) });
         }
@@ -344,19 +420,24 @@
         /// </summary>
         void LoadView_UnlockView()
         {
-            var unlockOptionView = new VerticalScrolViewLayout()
+            if(unlockOptionView!= null)
             {
-                Y = Application.GetRealWidth(340+64),
-                Height = Application.GetRealWidth(260),
+                unlockOptionView.RemoveAll();
+            }
+            unlockOptionView = new VerticalScrolViewLayout()
+            {
+                Y = topContentView.Bottom + Application.GetRealHeight(8),
+                Height = Application.GetRealHeight(260),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
                 ScrollEnabled = false,
+                Visible = UserInfo.Current.appUnlockPage.Count > 0
             };
             bodyView.AddChidren(unlockOptionView);
 
             #region 鏍囬鏍�
             var unlockTitleDiv = new FrameLayout()
             {
-                Height = Application.GetRealWidth(59),
+                Height = Application.GetRealHeight(59),
             };
             unlockOptionView.AddChidren(unlockTitleDiv);
 
@@ -387,8 +468,9 @@
             };
             unlockTitleDiv.AddChidren(btnUnlockTitleTip);
 
-            unlockOptionView.AddChidren(new Button() {
-                X  = Application.GetRealWidth(16),
+            unlockOptionView.AddChidren(new Button()
+            {
+                X = Application.GetRealWidth(16),
                 Width = Application.GetRealWidth(359),
                 Height = 1,
                 BackgroundColor = CSS_Color.BackgroundColor,
@@ -398,9 +480,12 @@
             #region 瀵嗙爜瑙i攣
             var passwordUnlockDiv = new FrameLayout()
             {
-                Height = Application.GetRealWidth(50),
+                Height = Application.GetRealHeight(50),
             };
-            unlockOptionView.AddChidren(passwordUnlockDiv);
+            if ( !UserInfo.Current.appUnlockType.Contains("2"))
+            {
+                unlockOptionView.AddChidren(passwordUnlockDiv);
+            }
 
             var btnPasswordUnlockIcon = new Button()
             {
@@ -412,15 +497,28 @@
             };
             passwordUnlockDiv.AddChidren(btnPasswordUnlockIcon);
 
-            var btnPasswordUnlockRightIcon = new Button()
+            //var btnPasswordUnlockRightIcon = new Button()
+            //{
+            //    X = Application.GetRealWidth(339),
+            //    Gravity = Gravity.CenterVertical,
+            //    Width = Application.GetMinRealAverage(16),
+            //    Height = Application.GetMinRealAverage(16),
+            //    UnSelectedImagePath = "Public/Right.png",
+            //};
+            //passwordUnlockDiv.AddChidren(btnPasswordUnlockRightIcon);
+
+
+            var btnPasswordUnlockkSwtichIcon = new Button()
             {
-                X = Application.GetRealWidth(339),
+                X = Application.GetRealWidth(322),
                 Gravity = Gravity.CenterVertical,
-                Width = Application.GetMinRealAverage(16),
-                Height = Application.GetMinRealAverage(16),
-                UnSelectedImagePath = "Public/Right.png",
+                Width = Application.GetMinRealAverage(38),
+                Height = Application.GetMinRealAverage(38),
+                UnSelectedImagePath = "Public/Switch_2.png",
+                SelectedImagePath = "Public/SwitchOn_2.png",
+                IsSelected = UserInfo.Current.appUnlockType.Contains("1")
             };
-            passwordUnlockDiv.AddChidren(btnPasswordUnlockRightIcon);
+            passwordUnlockDiv.AddChidren(btnPasswordUnlockkSwtichIcon);
 
             btnPasswordUnlockTitle = new Button()
             {
@@ -431,23 +529,67 @@
                 TextID = StringId.PasswordUnlock,
             };
             passwordUnlockDiv.AddChidren(btnPasswordUnlockTitle);
-            
-            unlockOptionView.AddChidren(new Button() {
-                X  = Application.GetRealWidth(16),
+
+            unlockOptionView.AddChidren(new Button()
+            {
+                X = Application.GetRealWidth(16),
                 Width = Application.GetRealWidth(343),
                 Height = 1,
                 BackgroundColor = CSS_Color.BackgroundColor,
             });
             #endregion
 
+            #region 淇敼瀵嗙爜
+            var resetPasswordDiv = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(50),
+            };
+            if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("1"))
+            {
+                unlockOptionView.AddChidren(resetPasswordDiv);
+            }
+            var btnPasswordUnlockRightIcon = new Button()
+            {
+                X = Application.GetRealWidth(339),
+                Gravity = Gravity.CenterVertical,
+                Width = Application.GetMinRealAverage(16),
+                Height = Application.GetMinRealAverage(16),
+                UnSelectedImagePath = "Public/Right.png",
+            };
+            resetPasswordDiv.AddChidren(btnPasswordUnlockRightIcon);
+
+
+            btnResetPasswordTitle = new Button()
+            {
+                X = Application.GetRealWidth(66),
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.TextFontSize,
+                TextID = StringId.ResetDigitalPassword,
+            };
+            resetPasswordDiv.AddChidren(btnResetPasswordTitle);
+
+            if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("1"))
+            {
+                unlockOptionView.AddChidren(new Button()
+                {
+                    X = Application.GetRealWidth(16),
+                    Width = Application.GetRealWidth(343),
+                    Height = 1,
+                    BackgroundColor = CSS_Color.BackgroundColor,
+                });
+            }
+            #endregion
 
             #region 鎵嬪娍瑙i攣
             var gestureUnlockDiv = new FrameLayout()
             {
-                Height = Application.GetRealWidth(50),
+                Height = Application.GetRealHeight(50),
             };
-            unlockOptionView.AddChidren(gestureUnlockDiv);
-
+            if (!UserInfo.Current.appUnlockType.Contains("1"))
+            {
+                unlockOptionView.AddChidren(gestureUnlockDiv);
+            }
             var btnGestureUnlockIcon = new Button()
             {
                 X = Application.GetRealWidth(16),
@@ -458,7 +600,62 @@
             };
             gestureUnlockDiv.AddChidren(btnGestureUnlockIcon);
 
-            var btnGestureUnlockRightIcon = new Button()
+            //var btnGestureUnlockRightIcon = new Button()
+            //{
+            //    X = Application.GetRealWidth(339),
+            //    Gravity = Gravity.CenterVertical,
+            //    Width = Application.GetMinRealAverage(16),
+            //    Height = Application.GetMinRealAverage(16),
+            //    UnSelectedImagePath = "Public/Right.png",
+            //};
+            //gestureUnlockDiv.AddChidren(btnGestureUnlockRightIcon);
+
+           var btnGestureUnlockkSwtichIcon = new Button()
+            {
+                X = Application.GetRealWidth(322),
+                Gravity = Gravity.CenterVertical,
+                Width = Application.GetMinRealAverage(38),
+                Height = Application.GetMinRealAverage(38),
+                UnSelectedImagePath = "Public/Switch_2.png",
+                SelectedImagePath = "Public/SwitchOn_2.png",
+                IsSelected = UserInfo.Current.appUnlockType.Contains("2")
+            };
+            gestureUnlockDiv.AddChidren(btnGestureUnlockkSwtichIcon);
+
+
+            btnGestureUnlockTitle = new Button()
+            {
+                X = Application.GetRealWidth(66),
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.TextFontSize,
+                TextID = StringId.GestureUnlock,
+            };
+            gestureUnlockDiv.AddChidren(btnGestureUnlockTitle);
+
+            if (!UserInfo.Current.appUnlockType.Contains("1"))
+            {
+                unlockOptionView.AddChidren(new Button()
+                {
+                    X = Application.GetRealWidth(16),
+                    Width = Application.GetRealWidth(343),
+                    Height = 1,
+                    BackgroundColor = CSS_Color.BackgroundColor,
+                });
+            }
+            #endregion
+
+
+            #region 淇敼鎵嬪娍
+            var resetGestureDiv = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(50),
+            };
+            if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("2"))
+            {
+                unlockOptionView.AddChidren(resetGestureDiv);
+            }
+            var btnGestureRightIcon = new Button()
             {
                 X = Application.GetRealWidth(339),
                 Gravity = Gravity.CenterVertical,
@@ -466,34 +663,55 @@
                 Height = Application.GetMinRealAverage(16),
                 UnSelectedImagePath = "Public/Right.png",
             };
-            gestureUnlockDiv.AddChidren(btnGestureUnlockRightIcon);
+            resetGestureDiv.AddChidren(btnGestureRightIcon);
 
-            var btnGestureUnlockTitle = new Button()
+
+            btnResetGestureTitle = new Button()
             {
                 X = Application.GetRealWidth(66),
                 TextAlignment = TextAlignment.CenterLeft,
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = CSS_FontSize.TextFontSize,
-                TextID = StringId.PasswordUnlock,
+                TextID = StringId.ResetGesturePassword,
             };
-            gestureUnlockDiv.AddChidren(btnGestureUnlockTitle);
+            resetGestureDiv.AddChidren(btnResetGestureTitle);
 
-            unlockOptionView.AddChidren(new Button() {
-                X  = Application.GetRealWidth(16),
-                Width = Application.GetRealWidth(343),
-                Height = 1,
-                BackgroundColor = CSS_Color.BackgroundColor,
-            });
+            if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("2"))
+            {
+                unlockOptionView.AddChidren(new Button()
+                {
+                    X = Application.GetRealWidth(16),
+                    Width = Application.GetRealWidth(343),
+                    Height = 1,
+                    BackgroundColor = CSS_Color.BackgroundColor,
+                });
+            }
             #endregion
 
+            #region 鏌ヨ璁惧鏄惁鏀寔闈㈠ID锛屾寚绾笽D
+            TouchIDUtils.TouchIDSupperType type = TouchIDUtils.getTouchIDSupperType();
+            if (type == TouchIDUtils.TouchIDSupperType.TouchID)
+            {
+                sTouchID = true;
+                MainPage.Log("KK锛氭敮鎸乀ouchID");
+            }
+            else if (type == TouchIDUtils.TouchIDSupperType.FaceID)
+            {
+                sFaceID = true;
+                MainPage.Log("KK锛氭敮鎸丗aceID");
+            }
 
+            #endregion
 
             #region 鎸囩汗瑙i攣
-            var fingerprintUnlockDiv = new FrameLayout()
+            fingerprintUnlockDiv = new FrameLayout()
             {
-                Height = Application.GetRealWidth(50),
+                Height = Application.GetRealHeight(51),
             };
-            unlockOptionView.AddChidren(fingerprintUnlockDiv);
+            if (sTouchID && UserInfo.Current.appUnlockPasswrod != "" && !UserInfo.Current.appUnlockType.Contains("4"))
+            {
+                unlockOptionView.AddChidren(fingerprintUnlockDiv);
+            }
 
             var btnFingerprintUnlockIcon = new Button()
             {
@@ -515,34 +733,39 @@
             };
             fingerprintUnlockDiv.AddChidren(btnFingerprintUnlockTitle);
 
-            var btnFingerprintUnlockSwtichIcon = new Button()
+            btnFingerprintUnlockSwtichIcon = new Button()
             {
                 X = Application.GetRealWidth(322),
-                Y = Application.GetRealHeight(4),
-                Width = Application.GetMinRealAverage(48),
-                Height = Application.GetMinRealAverage(36),
-                UnSelectedImagePath = "Public/Switch.png",
-                SelectedImagePath = "Public/SwitchOn.png",
+                Gravity = Gravity.CenterVertical,
+                Width = Application.GetMinRealAverage(38),
+                Height = Application.GetMinRealAverage(38),
+                UnSelectedImagePath = "Public/Switch_2.png",
+                SelectedImagePath = "Public/SwitchOn_2.png",
+                IsSelected = UserInfo.Current.appUnlockType.Contains("3")
             };
             fingerprintUnlockDiv.AddChidren(btnFingerprintUnlockSwtichIcon);
-            
-            unlockOptionView.AddChidren(new Button() {
-                X  = Application.GetRealWidth(16),
+
+            fingerprintUnlockDiv.AddChidren(new Button()
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(50),
                 Width = Application.GetRealWidth(343),
                 Height = 1,
                 BackgroundColor = CSS_Color.BackgroundColor,
+                //Visible = sFaceID
             });
 
             #endregion
 
-
             #region 闈㈠ID瑙i攣
-            var faceIdUnlockDiv = new FrameLayout()
+            faceIdUnlockDiv = new FrameLayout()
             {
-                Height = Application.GetRealWidth(50),
+                Height = Application.GetRealHeight(50),
             };
-            unlockOptionView.AddChidren(faceIdUnlockDiv);
-
+            if (sFaceID && UserInfo.Current.appUnlockPasswrod != "" && !UserInfo.Current.appUnlockType.Contains("3"))
+            {
+                unlockOptionView.AddChidren(faceIdUnlockDiv);
+            }
             var btnFaceIdUnlockIcon = new Button()
             {
                 X = Application.GetRealWidth(16),
@@ -563,19 +786,21 @@
             };
             faceIdUnlockDiv.AddChidren(btnFaceIdUnlockTitle);
 
-            var btnFaceIdUnlockSwtichIcon = new Button()
+            btnFaceIdUnlockSwtichIcon = new Button()
             {
                 X = Application.GetRealWidth(322),
-                Y = Application.GetRealHeight(4),
-                Width = Application.GetMinRealAverage(48),
-                Height = Application.GetMinRealAverage(36),
-                UnSelectedImagePath = "Public/Switch.png",
-                SelectedImagePath = "Public/SwitchOn.png",
+                Gravity= Gravity.CenterVertical,
+                Width = Application.GetMinRealAverage(38),
+                Height = Application.GetMinRealAverage(38),
+                UnSelectedImagePath = "Public/Switch_2.png",
+                SelectedImagePath = "Public/SwitchOn_2.png",
+                IsSelected = UserInfo.Current.appUnlockType.Contains("4")
             };
             faceIdUnlockDiv.AddChidren(btnFaceIdUnlockSwtichIcon);
 
             #endregion
 
+
             LoadEvet_SkipEventList();
 
         }

--
Gitblit v1.8.0