| | |
| | | refreshAction = () => |
| | | { |
| | | LoadView_UnlockView(); |
| | | //fingerprintUnlockDiv.Visible = sTouchID && (OnAppConfig.Instance.appUnlockType.Contains("1") || OnAppConfig.Instance.appUnlockType.Contains("2")); |
| | | //faceIdUnlockDiv.Visible = sFaceID && (OnAppConfig.Instance.appUnlockType.Contains("1") || OnAppConfig.Instance.appUnlockType.Contains("2")); |
| | | //btnFingerprintUnlockSwtichIcon.IsSelected = OnAppConfig.Instance.appUnlockType.Contains("3"); |
| | | //btnFaceIdUnlockSwtichIcon.IsSelected = OnAppConfig.Instance.appUnlockType.Contains("4"); |
| | | //fingerprintUnlockDiv.Visible = sTouchID && (UserInfo.Current.appUnlockType.Contains("1") || UserInfo.Current.appUnlockType.Contains("2")); |
| | | //faceIdUnlockDiv.Visible = sFaceID && (UserInfo.Current.appUnlockType.Contains("1") || UserInfo.Current.appUnlockType.Contains("2")); |
| | | //btnFingerprintUnlockSwtichIcon.IsSelected = UserInfo.Current.appUnlockType.Contains("3"); |
| | | //btnFaceIdUnlockSwtichIcon.IsSelected = UserInfo.Current.appUnlockType.Contains("4"); |
| | | }; |
| | | } |
| | | |
| | |
| | | |
| | | btnTipMsg.TextID = StringId.UnprotectedTipMsg; |
| | | |
| | | OnAppConfig.Instance.appUnlockPage = new System.Collections.Generic.List<string>(); |
| | | OnAppConfig.Instance.appUnlockType = new System.Collections.Generic.List<string>(); |
| | | OnAppConfig.Instance.appUnlockPasswrod = ""; |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | UserInfo.Current.appUnlockPage = new System.Collections.Generic.List<string>(); |
| | | UserInfo.Current.appUnlockType = new System.Collections.Generic.List<string>(); |
| | | UserInfo.Current.appUnlockPasswrod = ""; |
| | | UserInfo.Current.SaveUserInfo(); |
| | | unlockOptionView.Visible = false; |
| | | refreshAction(); |
| | | }; |
| | |
| | | if (!btnUnprotectedBg.IsSelected) |
| | | { |
| | | //1:验证指纹 |
| | | if (OnAppConfig.Instance.appUnlockType.Contains("3")) |
| | | if (UserInfo.Current.appUnlockType.Contains("3")) |
| | | { |
| | | TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.PleaseVerifyTheFingerprint)); |
| | | TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) => |
| | |
| | | else if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) |
| | | { |
| | | MainPage.Log("KK:用户选择手动输入密码"); |
| | | if (OnAppConfig.Instance.appUnlockType.Contains("1")) |
| | | if (UserInfo.Current.appUnlockType.Contains("1")) |
| | | { |
| | | var page = new AppUnlockPasswordPage(OnAppConfig.Instance.appUnlockPasswrod, action); |
| | | var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, action); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage("4"); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | else if (OnAppConfig.Instance.appUnlockType.Contains("1")) |
| | | else if (UserInfo.Current.appUnlockType.Contains("1")) |
| | | { |
| | | var page = new AppUnlockGesturePage(OnAppConfig.Instance.appUnlockPasswrod, action); |
| | | var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, action); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage("4"); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | } |
| | | }; |
| | | } |
| | | else if (OnAppConfig.Instance.appUnlockType.Contains("4")) |
| | | else if (UserInfo.Current.appUnlockType.Contains("4")) |
| | | { |
| | | //Face ID验证 |
| | | // |
| | | } |
| | | else if (OnAppConfig.Instance.appUnlockType.Contains("1")) |
| | | else if (UserInfo.Current.appUnlockType.Contains("1")) |
| | | { |
| | | var page = new AppUnlockPasswordPage(OnAppConfig.Instance.appUnlockPasswrod, action); |
| | | var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, action); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage("4"); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | else if (OnAppConfig.Instance.appUnlockType.Contains("2")) |
| | | else if (UserInfo.Current.appUnlockType.Contains("2")) |
| | | { |
| | | var page = new AppUnlockGesturePage(OnAppConfig.Instance.appUnlockPasswrod, action); |
| | | var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, action); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage("4"); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | } |
| | | }; |
| | | |
| | | if (OnAppConfig.Instance.appUnlockPasswrod != "") |
| | | if (UserInfo.Current.appUnlockPasswrod != "") |
| | | { |
| | | new PublicAssmebly().TipMsg(StringId.Tip, StringId.TipTurnOffUnlockingSetting, action1); |
| | | } |
| | |
| | | if (result) |
| | | { |
| | | btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; |
| | | if (!OnAppConfig.Instance.appUnlockPage.Contains("1")) |
| | | if (!UserInfo.Current.appUnlockPage.Contains("1")) |
| | | { |
| | | OnAppConfig.Instance.appUnlockPage.Add("1"); |
| | | if (OnAppConfig.Instance.appUnlockPasswrod != "") |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | UserInfo.Current.appUnlockPage.Add("1"); |
| | | if (UserInfo.Current.appUnlockPasswrod != "") |
| | | UserInfo.Current.SaveUserInfo(); |
| | | } |
| | | unlockOptionView.Visible = true; |
| | | } |
| | | else |
| | | { |
| | | if (OnAppConfig.Instance.appUnlockPage.Contains("1")) |
| | | if (UserInfo.Current.appUnlockPage.Contains("1")) |
| | | { |
| | | OnAppConfig.Instance.appUnlockPage.Remove("1"); |
| | | UserInfo.Current.appUnlockPage.Remove("1"); |
| | | } |
| | | if (OnAppConfig.Instance.appUnlockPage.Count == 0) |
| | | if (UserInfo.Current.appUnlockPage.Count == 0) |
| | | { |
| | | btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; |
| | | btnTipMsg.TextID = StringId.UnprotectedTipMsg; |
| | | OnAppConfig.Instance.appUnlockPasswrod = ""; |
| | | UserInfo.Current.appUnlockPasswrod = ""; |
| | | unlockOptionView.Visible = false; |
| | | refreshAction(); |
| | | } |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | } |
| | | }; |
| | | btnStartupBg.MouseUpEventHandler = eventHandler2; |
| | |
| | | if (result) |
| | | { |
| | | btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; |
| | | if (!OnAppConfig.Instance.appUnlockPage.Contains("2")) |
| | | if (!UserInfo.Current.appUnlockPage.Contains("2")) |
| | | { |
| | | OnAppConfig.Instance.appUnlockPage.Add("2"); |
| | | if (OnAppConfig.Instance.appUnlockPasswrod != "") |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | UserInfo.Current.appUnlockPage.Add("2"); |
| | | if (UserInfo.Current.appUnlockPasswrod != "") |
| | | UserInfo.Current.SaveUserInfo(); |
| | | } |
| | | unlockOptionView.Visible = true; |
| | | } |
| | | else |
| | | { |
| | | if (OnAppConfig.Instance.appUnlockPage.Contains("2")) |
| | | if (UserInfo.Current.appUnlockPage.Contains("2")) |
| | | { |
| | | OnAppConfig.Instance.appUnlockPage.Remove("2"); |
| | | UserInfo.Current.appUnlockPage.Remove("2"); |
| | | } |
| | | if (OnAppConfig.Instance.appUnlockPage.Count == 0) |
| | | if (UserInfo.Current.appUnlockPage.Count == 0) |
| | | { |
| | | btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = result; |
| | | btnTipMsg.TextID = StringId.UnprotectedTipMsg; |
| | | OnAppConfig.Instance.appUnlockPasswrod = ""; |
| | | UserInfo.Current.appUnlockPasswrod = ""; |
| | | unlockOptionView.Visible = false; |
| | | refreshAction(); |
| | | } |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | } |
| | | }; |
| | | btnSecurityBg.MouseUpEventHandler = eventHandler3; |
| | |
| | | if (result) |
| | | { |
| | | btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; |
| | | if (!OnAppConfig.Instance.appUnlockPage.Contains("3")) |
| | | if (!UserInfo.Current.appUnlockPage.Contains("3")) |
| | | { |
| | | OnAppConfig.Instance.appUnlockPage.Add("3"); |
| | | if (OnAppConfig.Instance.appUnlockPasswrod != "") |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | UserInfo.Current.appUnlockPage.Add("3"); |
| | | if (UserInfo.Current.appUnlockPasswrod != "") |
| | | UserInfo.Current.SaveUserInfo(); |
| | | } |
| | | unlockOptionView.Visible = true; |
| | | } |
| | | else |
| | | { |
| | | if (OnAppConfig.Instance.appUnlockPage.Contains("3")) |
| | | if (UserInfo.Current.appUnlockPage.Contains("3")) |
| | | { |
| | | OnAppConfig.Instance.appUnlockPage.Remove("3"); |
| | | UserInfo.Current.appUnlockPage.Remove("3"); |
| | | } |
| | | if (OnAppConfig.Instance.appUnlockPage.Count == 0) |
| | | if (UserInfo.Current.appUnlockPage.Count == 0) |
| | | { |
| | | btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; |
| | | btnTipMsg.TextID = StringId.UnprotectedTipMsg; |
| | | OnAppConfig.Instance.appUnlockPasswrod = ""; |
| | | UserInfo.Current.appUnlockPasswrod = ""; |
| | | unlockOptionView.Visible = false; |
| | | refreshAction(); |
| | | } |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | } |
| | | }; |
| | | btnDoorlockBg.MouseUpEventHandler = eventHandler4; |
| | |
| | | /// </summary> |
| | | void LoadEvent_InitOptionState() |
| | | { |
| | | if (OnAppConfig.Instance.appUnlockPage.Count == 0) |
| | | if (UserInfo.Current.appUnlockPage.Count == 0) |
| | | { |
| | | btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; |
| | | } |
| | | else |
| | | { |
| | | if (OnAppConfig.Instance.appUnlockPage.Contains("1")) |
| | | if (UserInfo.Current.appUnlockPage.Contains("1")) |
| | | { |
| | | btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = true; |
| | | btnTipMsg.Text = Language.StringByID(StringId.AtStartupTipMsg); |
| | | } |
| | | if (OnAppConfig.Instance.appUnlockPage.Contains("2")) |
| | | if (UserInfo.Current.appUnlockPage.Contains("2")) |
| | | { |
| | | btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = true; |
| | | btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg); |
| | | } |
| | | if (OnAppConfig.Instance.appUnlockPage.Contains("3")) |
| | | if (UserInfo.Current.appUnlockPage.Contains("3")) |
| | | { |
| | | btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = true; |
| | | btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); |
| | |
| | | { |
| | | btnPasswordUnlockTitle.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new AppUnlockPasswordPage(OnAppConfig.Instance.appUnlockPasswrod, refreshAction); |
| | | var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, refreshAction); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(OnAppConfig.Instance.appUnlockType.Contains("1") ? "3" : "1"); |
| | | page.LoadPage(UserInfo.Current.appUnlockType.Contains("1") ? "3" : "1"); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | btnResetPasswordTitle.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new AppUnlockPasswordPage(OnAppConfig.Instance.appUnlockPasswrod, refreshAction); |
| | | var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, refreshAction); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage("2"); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | |
| | | btnGestureUnlockTitle.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new AppUnlockGesturePage(OnAppConfig.Instance.appUnlockPasswrod, refreshAction); |
| | | var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, refreshAction); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(OnAppConfig.Instance.appUnlockType.Contains("2") ? "3" : "1"); |
| | | page.LoadPage(UserInfo.Current.appUnlockType.Contains("2") ? "3" : "1"); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnResetGestureTitle.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new AppUnlockGesturePage(OnAppConfig.Instance.appUnlockPasswrod, refreshAction); |
| | | var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, refreshAction); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage("3"); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | var result = btnFingerprintUnlockSwtichIcon.IsSelected = !btnFingerprintUnlockSwtichIcon.IsSelected; |
| | | if (result) |
| | | { |
| | | if (!OnAppConfig.Instance.appUnlockType.Contains("3")) |
| | | if (!UserInfo.Current.appUnlockType.Contains("3")) |
| | | { |
| | | OnAppConfig.Instance.appUnlockType.Add("3"); |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | UserInfo.Current.appUnlockType.Add("3"); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (OnAppConfig.Instance.appUnlockType.Contains("3")) |
| | | if (UserInfo.Current.appUnlockType.Contains("3")) |
| | | { |
| | | OnAppConfig.Instance.appUnlockType.Remove("3"); |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | UserInfo.Current.appUnlockType.Remove("3"); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | } |
| | | } |
| | | //MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 1); |
| | |
| | | } |
| | | else// if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) |
| | | { |
| | | if (OnAppConfig.Instance.appUnlockType.Contains("1")) |
| | | if (UserInfo.Current.appUnlockType.Contains("1")) |
| | | { |
| | | var page = new AppUnlockPasswordPage(OnAppConfig.Instance.appUnlockPasswrod, refreshAction); |
| | | var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, refreshAction); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage("5"); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | else if (OnAppConfig.Instance.appUnlockType.Contains("2")) |
| | | else if (UserInfo.Current.appUnlockType.Contains("2")) |
| | | { |
| | | var page = new AppUnlockGesturePage(OnAppConfig.Instance.appUnlockPasswrod, refreshAction); |
| | | var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, refreshAction); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage("5"); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |