From 53189866ba4012fec0b40990fd2281b836fa2668 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 01 七月 2020 16:29:16 +0800 Subject: [PATCH] 20200701 --- HDL_ON/UI/UI0-Public/AppUnlockPage.cs | 36 ++++++++++++++++++++++-------------- 1 files changed, 22 insertions(+), 14 deletions(-) diff --git a/HDL_ON/UI/UI0-Public/AppUnlockPage.cs b/HDL_ON/UI/UI0-Public/AppUnlockPage.cs index 513166e..30eab49 100644 --- a/HDL_ON/UI/UI0-Public/AppUnlockPage.cs +++ b/HDL_ON/UI/UI0-Public/AppUnlockPage.cs @@ -5,19 +5,21 @@ /// <summary> /// app瑙i攣鐣岄潰 /// </summary> - public static class AppUnlockPage + public class AppUnlockPage { - static DateTime unlockTime = DateTime.MinValue; - static void LoadOption() + DateTime unlockTime = DateTime.MinValue; + void LoadOption() { - Action action = () => { unlockTime = DateTime.Now; }; //1:楠岃瘉鎸囩汗 if (MainPage.LoginUser.appUnlockType.Contains("3")) { - LoadGesturePage(); + Action fAction = () => { + LoadOption(); + }; + LoadGesturePage("7", fAction); TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.PleaseVerifyTheFingerprint)); TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) => { @@ -39,7 +41,7 @@ page.LoadPage("7"); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; } - else if (MainPage.LoginUser.appUnlockType.Contains("1")) + else if (MainPage.LoginUser.appUnlockType.Contains("2")) { var page = new AppUnlockGesturePage(MainPage.LoginUser.appUnlockPasswrod, action); MainPage.BasePageView.AddChidren(page); @@ -70,15 +72,22 @@ } } - public static void LoadPage() + public void LoadPage() { LoadOption(); } - static void LoadGesturePage() + + /// <summary> + /// 鍔犺浇鎸囩汗楠岃瘉鐣岄潰 + /// </summary> + public void LoadGesturePage(string optionType,Action fingerAction) { - if (unlockTime.AddSeconds(60) > DateTime.Now || MainPage.LoginUser.appUnlockPasswrod == "" || MainPage.LoginUser.appUnlockPage.Count == 0) + if (optionType == "7") { - return; + if (unlockTime.AddSeconds(60) > DateTime.Now || MainPage.LoginUser.appUnlockPasswrod == "" || MainPage.LoginUser.appUnlockPage.Count == 0) + { + return; + } } var bodyView = new FrameLayout() { @@ -86,7 +95,6 @@ }; MainPage.BasePageView.AddChidren(bodyView); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - bodyView.AddChidren(new Button() { Height = Application.GetRealHeight(64), @@ -114,7 +122,7 @@ bodyView.AddChidren(btnFingerIcon); btnFingerIcon.MouseUpEventHandler = (sender, e) => { - LoadOption(); + fingerAction(); }; var btnOtherVerify = new Button() @@ -139,14 +147,14 @@ { var page = new AppUnlockPasswordPage(MainPage.LoginUser.appUnlockPasswrod, action); MainPage.BasePageView.AddChidren(page); - page.LoadPage("7"); + page.LoadPage(optionType); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; } else if (MainPage.LoginUser.appUnlockType.Contains("2")) { var page = new AppUnlockGesturePage(MainPage.LoginUser.appUnlockPasswrod, action); MainPage.BasePageView.AddChidren(page); - page.LoadPage("7"); + page.LoadPage(optionType); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; } }; -- Gitblit v1.8.0