| | |
| | | //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)); |
| | | |
| | |
| | | { |
| | | 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) |
| | |
| | | { |
| | | //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)); |
| | | |
| | |
| | | { |
| | | 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) |