| | |
| | | /// <summary> |
| | | /// app解锁界面 |
| | | /// </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) => |
| | | { |
| | |
| | | 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); |
| | |
| | | } |
| | | } |
| | | |
| | | public static void LoadPage() |
| | | public void LoadPage() |
| | | { |
| | | LoadOption(); |
| | | } |
| | | static void LoadGesturePage() |
| | | |
| | | /// <summary> |
| | | /// 加载指纹验证界面 |
| | | /// </summary> |
| | | public void LoadGesturePage(string optionType,Action fingerAction) |
| | | { |
| | | if (optionType == "7") |
| | | { |
| | | if (unlockTime.AddSeconds(60) > DateTime.Now || MainPage.LoginUser.appUnlockPasswrod == "" || MainPage.LoginUser.appUnlockPage.Count == 0) |
| | | { |
| | | return; |
| | | } |
| | | } |
| | | var bodyView = new FrameLayout() |
| | | { |
| | |
| | | }; |
| | | MainPage.BasePageView.AddChidren(bodyView); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | |
| | | bodyView.AddChidren(new Button() { |
| | | Height = Application.GetRealHeight(64), |
| | |
| | | bodyView.AddChidren(btnFingerIcon); |
| | | |
| | | btnFingerIcon.MouseUpEventHandler = (sender, e) => { |
| | | LoadOption(); |
| | | fingerAction(); |
| | | }; |
| | | |
| | | var btnOtherVerify = new Button() |
| | |
| | | { |
| | | 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; |
| | | } |
| | | }; |