From a6bad443ca7e9d01ebf22e1a0b2452b9e25120e7 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 16 十二月 2020 15:40:13 +0800 Subject: [PATCH] Merge branch 'CJL' into NewFilePath --- HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs | 86 ++++++++++++++++++++++++------------------ 1 files changed, 49 insertions(+), 37 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs index 0ef85c1..0594119 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs @@ -330,11 +330,33 @@ //4:闈㈠ID string faceIDUnlockType = "4"; + //鎴愬姛浜嬩欢 + Action successAction = () => + { + var result = btnFaceIdUnlockSwtichIcon.IsSelected = !btnFaceIdUnlockSwtichIcon.IsSelected; + if (result) + { + if (!UserInfo.Current.appUnlockType.Contains(faceIDUnlockType)) + { + UserInfo.Current.appUnlockType.Add(faceIDUnlockType); + UserInfo.Current.SaveUserInfo(); + } + } + else + { + if (UserInfo.Current.appUnlockType.Contains(faceIDUnlockType)) + { + UserInfo.Current.appUnlockType.Remove(faceIDUnlockType); + UserInfo.Current.SaveUserInfo(); + } + } + }; + Action fingerAction = () => { TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.VerifyFaceID)); }; - new AppUnlockPage().LoadFaceIDGesturePage(optionType, fingerAction); + new AppUnlockPage().LoadFaceIDGesturePage(optionType, fingerAction, successAction); TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.VerifyFaceID)); @@ -342,24 +364,7 @@ { if (e == TouchIDUtils.TouchIDState.Success) { - var result = btnFaceIdUnlockSwtichIcon.IsSelected = !btnFaceIdUnlockSwtichIcon.IsSelected; - if (result) - { - if (!UserInfo.Current.appUnlockType.Contains(faceIDUnlockType)) - { - UserInfo.Current.appUnlockType.Add(faceIDUnlockType); - UserInfo.Current.SaveUserInfo(); - } - } - else - { - if (UserInfo.Current.appUnlockType.Contains(faceIDUnlockType)) - { - UserInfo.Current.appUnlockType.Remove(faceIDUnlockType); - UserInfo.Current.SaveUserInfo(); - } - } - //MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 1); + successAction?.Invoke(); MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent(); } else// if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) @@ -413,12 +418,34 @@ { //5:鎸囩汗ID寮�鍏� string optionType = "5"; + //鎴愬姛浜嬩欢 + Action successAction = () => + { + var result = btnFingerprintUnlockSwtichIcon.IsSelected = !btnFingerprintUnlockSwtichIcon.IsSelected; + if (result) + { + if (!UserInfo.Current.appUnlockType.Contains("3")) + { + UserInfo.Current.appUnlockType.Add("3"); + UserInfo.Current.SaveUserInfo(); + } + } + else + { + if (UserInfo.Current.appUnlockType.Contains("3")) + { + UserInfo.Current.appUnlockType.Remove("3"); + UserInfo.Current.SaveUserInfo(); + } + } + }; + Action fingerAction = () => { TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.PleaseVerifyTheFingerprint)); }; - new AppUnlockPage().LoadGesturePage(optionType, fingerAction); + new AppUnlockPage().LoadGesturePage(optionType, fingerAction, successAction); TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.PleaseVerifyTheFingerprint)); @@ -426,23 +453,8 @@ { if (e == TouchIDUtils.TouchIDState.Success) { - var result = btnFingerprintUnlockSwtichIcon.IsSelected = !btnFingerprintUnlockSwtichIcon.IsSelected; - if (result) - { - if (!UserInfo.Current.appUnlockType.Contains("3")) - { - UserInfo.Current.appUnlockType.Add("3"); - UserInfo.Current.SaveUserInfo(); - } - } - else - { - if (UserInfo.Current.appUnlockType.Contains("3")) - { - UserInfo.Current.appUnlockType.Remove("3"); - UserInfo.Current.SaveUserInfo(); - } - } + successAction?.Invoke(); + MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent(); } else// if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) -- Gitblit v1.8.0