From acc8caee31c4be90bd38d1af18136b0e84f6fe94 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期五, 27 九月 2024 14:01:19 +0800 Subject: [PATCH] Merge branch 'feature/v2.7_迭代' into feature/V2.7_Google --- HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs | 1022 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 511 insertions(+), 511 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs index 43e9dc3..3c02d0d 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs @@ -1,551 +1,551 @@ -锘縰sing System; -using Shared; +锘�//using System; +//using Shared; -namespace HDL_ON.UI -{ - public partial class AppUnlockSettingsPage - { - Action refreshAction; - void LoadEventList() - { - LoadEvent_OptionChange(); - LoadEvent_InitOptionState(); +//namespace HDL_ON.UI +//{ +// public partial class AppUnlockSettingsPage +// { +// Action refreshAction; +// void LoadEventList() +// { +// LoadEvent_OptionChange(); +// LoadEvent_InitOptionState(); - refreshAction = () => - { - LoadView_UnlockView(); - //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"); - }; - } +// refreshAction = () => +// { +// LoadView_UnlockView(); +// //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"); +// }; +// } - /// <summary> - /// 鍔犺浇瀵嗙爜閫夐」浜嬩欢 - /// </summary> - void LoadEvent_OptionChange() - { - EventHandler<MouseEventArgs> eventHandler1 = (sender, e1) => - { - Action action = () => - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; - btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = false; - #region F3闃舵 - //btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = false; - btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = false; - #endregion +// /// <summary> +// /// 鍔犺浇瀵嗙爜閫夐」浜嬩欢 +// /// </summary> +// void LoadEvent_OptionChange() +// { +// EventHandler<MouseEventArgs> eventHandler1 = (sender, e1) => +// { +// Action action = () => +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; +// btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = false; +// #region F3闃舵 +// //btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = false; +// btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = false; +// #endregion - btnTipMsg.TextID = StringId.UnprotectedTipMsg; +// btnTipMsg.TextID = StringId.UnprotectedTipMsg; - 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(); - }; - Action action1 = () => - { - if (!btnUnprotectedBg.IsSelected) - { - //1:楠岃瘉鎸囩汗 - if (UserInfo.Current.appUnlockType.Contains("3")) - { - TouchIDVerification_TurnOffUnlock(action); - } - else if (UserInfo.Current.appUnlockType.Contains("4")) - { - //Face ID楠岃瘉 - FaceIDVerification_TurnOffUnlock(action); - } - else if (UserInfo.Current.appUnlockType.Contains("1")) - { - var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, action); - MainPage.BasePageView.AddChidren(page); - page.LoadPage("4"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - else if (UserInfo.Current.appUnlockType.Contains("2")) - { - var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, action); - MainPage.BasePageView.AddChidren(page); - page.LoadPage("4"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - } - }; +// 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(); +// }; +// Action action1 = () => +// { +// if (!btnUnprotectedBg.IsSelected) +// { +// //1:楠岃瘉鎸囩汗 +// if (UserInfo.Current.appUnlockType.Contains("3")) +// { +// TouchIDVerification_TurnOffUnlock(action); +// } +// else if (UserInfo.Current.appUnlockType.Contains("4")) +// { +// //Face ID楠岃瘉 +// FaceIDVerification_TurnOffUnlock(action); +// } +// else if (UserInfo.Current.appUnlockType.Contains("1")) +// { +// var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, action); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage("4"); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// else if (UserInfo.Current.appUnlockType.Contains("2")) +// { +// var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, action); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage("4"); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// } +// }; - if (UserInfo.Current.appUnlockPasswrod != "") - { - new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.TipTurnOffUnlockingSetting, action1); - } - else - { - action(); - } - }; - btnUnprotectedBg.MouseUpEventHandler = eventHandler1; - btnUnprotectedSelectionIcon.MouseUpEventHandler = eventHandler1; - btnUnprotectedSelectionTip.MouseUpEventHandler = eventHandler1; +// if (UserInfo.Current.appUnlockPasswrod != "") +// { +// new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.TipTurnOffUnlockingSetting, action1); +// } +// else +// { +// action(); +// } +// }; +// btnUnprotectedBg.MouseUpEventHandler = eventHandler1; +// btnUnprotectedSelectionIcon.MouseUpEventHandler = eventHandler1; +// btnUnprotectedSelectionTip.MouseUpEventHandler = eventHandler1; - EventHandler<MouseEventArgs> eventHandler2 = (sender, e) => - { - bool result = !btnStartupBg.IsSelected; - if (!result) - { - //濡傛灉鍚姩瑙i攣 涓嶈兘鍙栨秷鍚姩瑙i攣 - if (!CheckIfCanDeselect("1")) return; - } - btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = result; +// EventHandler<MouseEventArgs> eventHandler2 = (sender, e) => +// { +// bool result = !btnStartupBg.IsSelected; +// if (!result) +// { +// //濡傛灉鍚姩瑙i攣 涓嶈兘鍙栨秷鍚姩瑙i攣 +// if (!CheckIfCanDeselect("1")) return; +// } +// btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = result; - btnTipMsg.Text = Language.StringByID(StringId.AtStartupTipMsg); - if (result) - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; - if (!UserInfo.Current.appUnlockPage.Contains("1")) - { - UserInfo.Current.appUnlockPage.Add("1"); - if (UserInfo.Current.appUnlockPasswrod != "") - UserInfo.Current.SaveUserInfo(); - } - unlockOptionView.Visible = true; - } - else - { - if (UserInfo.Current.appUnlockPage.Contains("1")) - { - UserInfo.Current.appUnlockPage.Remove("1"); - } - if (UserInfo.Current.appUnlockPage.Count == 0) - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; - btnTipMsg.TextID = StringId.UnprotectedTipMsg; - UserInfo.Current.appUnlockPasswrod = ""; - unlockOptionView.Visible = false; - refreshAction(); - } - UserInfo.Current.SaveUserInfo(); - } - }; - btnStartupBg.MouseUpEventHandler = eventHandler2; - btnStartupSelectionIcon.MouseUpEventHandler = eventHandler2; - btnStartupSelectionTip.MouseUpEventHandler = eventHandler2; +// btnTipMsg.Text = Language.StringByID(StringId.AtStartupTipMsg); +// if (result) +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; +// if (!UserInfo.Current.appUnlockPage.Contains("1")) +// { +// UserInfo.Current.appUnlockPage.Add("1"); +// if (UserInfo.Current.appUnlockPasswrod != "") +// UserInfo.Current.SaveUserInfo(); +// } +// unlockOptionView.Visible = true; +// } +// else +// { +// if (UserInfo.Current.appUnlockPage.Contains("1")) +// { +// UserInfo.Current.appUnlockPage.Remove("1"); +// } +// if (UserInfo.Current.appUnlockPage.Count == 0) +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; +// btnTipMsg.TextID = StringId.UnprotectedTipMsg; +// UserInfo.Current.appUnlockPasswrod = ""; +// unlockOptionView.Visible = false; +// refreshAction(); +// } +// UserInfo.Current.SaveUserInfo(); +// } +// }; +// btnStartupBg.MouseUpEventHandler = eventHandler2; +// btnStartupSelectionIcon.MouseUpEventHandler = eventHandler2; +// btnStartupSelectionTip.MouseUpEventHandler = eventHandler2; - #region F3闃舵 - //EventHandler<MouseEventArgs> eventHandler3 = (sender, e) => - //{ - // bool result = !btnSecurityBg.IsSelected; - // if (!result) - // { - // //濡傛灉鍙墿甯冮槻/鎾ら槻涓�绉� 涓嶈兘鍙栨秷甯冮槻/鎾ら槻 - // if (!CheckIfCanDeselect("2")) return; - // } - // btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = result; - // btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg); - // if (result) - // { - // btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; - // if (!UserInfo.Current.appUnlockPage.Contains("2")) - // { - // UserInfo.Current.appUnlockPage.Add("2"); - // if (UserInfo.Current.appUnlockPasswrod != "") - // UserInfo.Current.SaveUserInfo(); - // } - // unlockOptionView.Visible = true; - // } - // else - // { - // if (UserInfo.Current.appUnlockPage.Contains("2")) - // { - // UserInfo.Current.appUnlockPage.Remove("2"); - // } - // if (UserInfo.Current.appUnlockPage.Count == 0) - // { - // btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = result; - // btnTipMsg.TextID = StringId.UnprotectedTipMsg; - // UserInfo.Current.appUnlockPasswrod = ""; - // unlockOptionView.Visible = false; - // refreshAction(); - // } - // UserInfo.Current.SaveUserInfo(); - // } - //}; - //btnSecurityBg.MouseUpEventHandler = eventHandler3; - //btnSecuritySelectionIcon.MouseUpEventHandler = eventHandler3; - //btnSecuritySelectionTip.MouseUpEventHandler = eventHandler3; +// #region F3闃舵 +// //EventHandler<MouseEventArgs> eventHandler3 = (sender, e) => +// //{ +// // bool result = !btnSecurityBg.IsSelected; +// // if (!result) +// // { +// // //濡傛灉鍙墿甯冮槻/鎾ら槻涓�绉� 涓嶈兘鍙栨秷甯冮槻/鎾ら槻 +// // if (!CheckIfCanDeselect("2")) return; +// // } +// // btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = result; +// // btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg); +// // if (result) +// // { +// // btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; +// // if (!UserInfo.Current.appUnlockPage.Contains("2")) +// // { +// // UserInfo.Current.appUnlockPage.Add("2"); +// // if (UserInfo.Current.appUnlockPasswrod != "") +// // UserInfo.Current.SaveUserInfo(); +// // } +// // unlockOptionView.Visible = true; +// // } +// // else +// // { +// // if (UserInfo.Current.appUnlockPage.Contains("2")) +// // { +// // UserInfo.Current.appUnlockPage.Remove("2"); +// // } +// // if (UserInfo.Current.appUnlockPage.Count == 0) +// // { +// // btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = result; +// // btnTipMsg.TextID = StringId.UnprotectedTipMsg; +// // UserInfo.Current.appUnlockPasswrod = ""; +// // unlockOptionView.Visible = false; +// // refreshAction(); +// // } +// // UserInfo.Current.SaveUserInfo(); +// // } +// //}; +// //btnSecurityBg.MouseUpEventHandler = eventHandler3; +// //btnSecuritySelectionIcon.MouseUpEventHandler = eventHandler3; +// //btnSecuritySelectionTip.MouseUpEventHandler = eventHandler3; - EventHandler<MouseEventArgs> eventHandler4 = (sender, e) => - { - bool result = !btnDoorlockBg.IsSelected; - if (!result) - { - //濡傛灉鍙墿杩滅▼寮�閿佷笉鑳藉彇娑堣繙绋嬪紑閿� - if (!CheckIfCanDeselect("3")) return; - } +// EventHandler<MouseEventArgs> eventHandler4 = (sender, e) => +// { +// bool result = !btnDoorlockBg.IsSelected; +// if (!result) +// { +// //濡傛灉鍙墿杩滅▼寮�閿佷笉鑳藉彇娑堣繙绋嬪紑閿� +// if (!CheckIfCanDeselect("3")) return; +// } - btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = result; +// btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = result; - btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); - if (result) - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; - if (!UserInfo.Current.appUnlockPage.Contains("3")) - { - UserInfo.Current.appUnlockPage.Add("3"); - if (UserInfo.Current.appUnlockPasswrod != "") - UserInfo.Current.SaveUserInfo(); - } - unlockOptionView.Visible = true; - } - else - { - if (UserInfo.Current.appUnlockPage.Contains("3")) - { - UserInfo.Current.appUnlockPage.Remove("3"); - } - if (UserInfo.Current.appUnlockPage.Count == 0) - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; - btnTipMsg.TextID = StringId.UnprotectedTipMsg; - UserInfo.Current.appUnlockPasswrod = ""; - unlockOptionView.Visible = false; - refreshAction(); - } - UserInfo.Current.SaveUserInfo(); - } - }; - btnDoorlockBg.MouseUpEventHandler = eventHandler4; - btnDoorlockSelectionIcon.MouseUpEventHandler = eventHandler4; - btnDoorlockSelectionTip.MouseUpEventHandler = eventHandler4; - #endregion - } +// btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); +// if (result) +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; +// if (!UserInfo.Current.appUnlockPage.Contains("3")) +// { +// UserInfo.Current.appUnlockPage.Add("3"); +// if (UserInfo.Current.appUnlockPasswrod != "") +// UserInfo.Current.SaveUserInfo(); +// } +// unlockOptionView.Visible = true; +// } +// else +// { +// if (UserInfo.Current.appUnlockPage.Contains("3")) +// { +// UserInfo.Current.appUnlockPage.Remove("3"); +// } +// if (UserInfo.Current.appUnlockPage.Count == 0) +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; +// btnTipMsg.TextID = StringId.UnprotectedTipMsg; +// UserInfo.Current.appUnlockPasswrod = ""; +// unlockOptionView.Visible = false; +// refreshAction(); +// } +// UserInfo.Current.SaveUserInfo(); +// } +// }; +// btnDoorlockBg.MouseUpEventHandler = eventHandler4; +// btnDoorlockSelectionIcon.MouseUpEventHandler = eventHandler4; +// btnDoorlockSelectionTip.MouseUpEventHandler = eventHandler4; +// #endregion +// } - /// <summary> - /// 鍔犺浇鐢ㄦ埛瀵嗙爜閫夐」鐘舵�� - /// </summary> - void LoadEvent_InitOptionState() - { - if (UserInfo.Current.appUnlockPage.Count == 0) - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; - } - else - { - if (UserInfo.Current.appUnlockPage.Contains("1")) - { - btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = true; - btnTipMsg.Text = Language.StringByID(StringId.AtStartupTipMsg); - } - #region F3闃舵 - //if (UserInfo.Current.appUnlockPage.Contains("2")) - //{ - // btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = true; - // btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg); - //} - if (UserInfo.Current.appUnlockPage.Contains("3")) - { - btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = true; - btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); - } - #endregion - } - } +// /// <summary> +// /// 鍔犺浇鐢ㄦ埛瀵嗙爜閫夐」鐘舵�� +// /// </summary> +// void LoadEvent_InitOptionState() +// { +// if (UserInfo.Current.appUnlockPage.Count == 0) +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; +// } +// else +// { +// if (UserInfo.Current.appUnlockPage.Contains("1")) +// { +// btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = true; +// btnTipMsg.Text = Language.StringByID(StringId.AtStartupTipMsg); +// } +// #region F3闃舵 +// //if (UserInfo.Current.appUnlockPage.Contains("2")) +// //{ +// // btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = true; +// // btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg); +// //} +// if (UserInfo.Current.appUnlockPage.Contains("3")) +// { +// btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = true; +// btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); +// } +// #endregion +// } +// } - /// <summary> - /// 瀵嗙爜璁剧疆璺宠浆浜嬩欢鍒楄〃 - /// </summary> - void LoadEvet_SkipEventList() - { - btnPasswordUnlockTitle.MouseUpEventHandler = (sender, e) => - { - var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, refreshAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(UserInfo.Current.appUnlockType.Contains("1") ? "3" : "1"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; +// /// <summary> +// /// 瀵嗙爜璁剧疆璺宠浆浜嬩欢鍒楄〃 +// /// </summary> +// void LoadEvet_SkipEventList() +// { +// btnPasswordUnlockTitle.MouseUpEventHandler = (sender, e) => +// { +// var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, refreshAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(UserInfo.Current.appUnlockType.Contains("1") ? "3" : "1"); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// }; - btnResetPasswordTitle.MouseUpEventHandler = (sender, e) => - { - var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, refreshAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage("2"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; +// btnResetPasswordTitle.MouseUpEventHandler = (sender, e) => +// { +// 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(UserInfo.Current.appUnlockPasswrod, refreshAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(UserInfo.Current.appUnlockType.Contains("2") ? "3" : "1"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; - btnResetGestureTitle.MouseUpEventHandler = (sender, e) => - { - var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, refreshAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage("2");//2020-12-11 - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; +// btnGestureUnlockTitle.MouseUpEventHandler = (sender, e) => +// { +// var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, refreshAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(UserInfo.Current.appUnlockType.Contains("2") ? "3" : "1"); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// }; +// btnResetGestureTitle.MouseUpEventHandler = (sender, e) => +// { +// var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, refreshAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage("2");//2020-12-11 +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// }; - if (sTouchID) - { - btnFingerprintUnlockSwtichIcon.MouseUpEventHandler = (sender, e1) => - { - TouchIDVerification_SwtichOnOff(); - }; - } - if (sFaceID) - { - btnFaceIdUnlockSwtichIcon.MouseUpEventHandler = (sender, e1) => - { - FaceIDVerification_SwtichOnOff(); - }; - } - } +// if (sTouchID) +// { +// btnFingerprintUnlockSwtichIcon.MouseUpEventHandler = (sender, e1) => +// { +// TouchIDVerification_SwtichOnOff(); +// }; +// } +// if (sFaceID) +// { +// btnFaceIdUnlockSwtichIcon.MouseUpEventHandler = (sender, e1) => +// { +// FaceIDVerification_SwtichOnOff(); +// }; +// } +// } - /// <summary> - /// 鍒ゆ柇鏄惁鑳藉鍙栨秷锛屽鏋滃彧鍓╂渶鍚庝竴绉嶈В閿佹柟妗堢姝㈠彇娑� - /// </summary> - /// <param name="appUnlockPageType">1:鍚姩鏃� 2:甯冮槻鎾ら槻鏃� 3:杩滅▼寮�閿佹椂</param> - /// <returns></returns> - bool CheckIfCanDeselect(string appUnlockPageType) - { - if (UserInfo.Current.appUnlockPage.Count == 1 && UserInfo.Current.appUnlockPage.Contains(appUnlockPageType)) - { - return false; - } +// /// <summary> +// /// 鍒ゆ柇鏄惁鑳藉鍙栨秷锛屽鏋滃彧鍓╂渶鍚庝竴绉嶈В閿佹柟妗堢姝㈠彇娑� +// /// </summary> +// /// <param name="appUnlockPageType">1:鍚姩鏃� 2:甯冮槻鎾ら槻鏃� 3:杩滅▼寮�閿佹椂</param> +// /// <returns></returns> +// bool CheckIfCanDeselect(string appUnlockPageType) +// { +// if (UserInfo.Current.appUnlockPage.Count == 1 && UserInfo.Current.appUnlockPage.Contains(appUnlockPageType)) +// { +// return false; +// } - return true; - } +// return true; +// } - /// <summary> - /// 闈㈠ID楠岃瘉寮圭獥 - /// </summary> - /// <param name="successAction"></param> - /// <param name="goToVerifyPasswordAction"></param> - void FaceIDVerification_Show(Action successAction, Action goToVerifyPasswordAction) - { - //鎻愮ず鏁板瓧瀵嗙爜楠岃瘉杩樻槸缁樺埗鎵嬪娍楠岃瘉 - string verificationTitleString = GetVerificationTitleString(); +// /// <summary> +// /// 闈㈠ID楠岃瘉寮圭獥 +// /// </summary> +// /// <param name="successAction"></param> +// /// <param name="goToVerifyPasswordAction"></param> +// void FaceIDVerification_Show(Action successAction, Action goToVerifyPasswordAction) +// { +// //鎻愮ず鏁板瓧瀵嗙爜楠岃瘉杩樻槸缁樺埗鎵嬪娍楠岃瘉 +// string verificationTitleString = GetVerificationTitleString(); - TouchIDUtils.Instance.showTouchIDWithDescribe(verificationTitleString, Language.StringByID(StringId.VerifyFaceID)); - TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) => - { - if (e == TouchIDUtils.TouchIDState.Success) - { - MainPage.Log("KK:FaceID楠岃瘉鎴愬姛"); - successAction?.Invoke(); - } - else if (e == TouchIDUtils.TouchIDState.NotSupport) - { - MainPage.Log("KK:褰撳墠璁惧涓嶆敮鎸丗aceID楠岃瘉,璇疯緭鍏ュ瘑鐮佹潵楠岃瘉"); - goToVerifyPasswordAction(); - } - else if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) - { - MainPage.Log("KK:鐢ㄦ埛閫夋嫨鎵嬪姩杈撳叆瀵嗙爜"); - goToVerifyPasswordAction(); - } - }; - } +// TouchIDUtils.Instance.showTouchIDWithDescribe(verificationTitleString, Language.StringByID(StringId.VerifyFaceID)); +// TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) => +// { +// if (e == TouchIDUtils.TouchIDState.Success) +// { +// MainPage.Log("KK:FaceID楠岃瘉鎴愬姛"); +// successAction?.Invoke(); +// } +// else if (e == TouchIDUtils.TouchIDState.NotSupport) +// { +// MainPage.Log("KK:褰撳墠璁惧涓嶆敮鎸丗aceID楠岃瘉,璇疯緭鍏ュ瘑鐮佹潵楠岃瘉"); +// goToVerifyPasswordAction(); +// } +// else if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) +// { +// MainPage.Log("KK:鐢ㄦ埛閫夋嫨鎵嬪姩杈撳叆瀵嗙爜"); +// goToVerifyPasswordAction(); +// } +// }; +// } - /// <summary> - /// 闈㈠ID寮�鍚拰鍏抽棴 - /// </summary> - /// <param name="successAction">楠岃瘉鎴愬姛浜嬩欢</param> - void FaceIDVerification_SwtichOnOff() - { - //4:闈㈠ID - string faceIDUnlockType = "4"; - //6:闈㈠ID寮�鍏� - string optionType = "6"; - //鎴愬姛浜嬩欢 - 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(); - } - } - }; +// /// <summary> +// /// 闈㈠ID寮�鍚拰鍏抽棴 +// /// </summary> +// /// <param name="successAction">楠岃瘉鎴愬姛浜嬩欢</param> +// void FaceIDVerification_SwtichOnOff() +// { +// //4:闈㈠ID +// string faceIDUnlockType = "4"; +// //6:闈㈠ID寮�鍏� +// string optionType = "6"; +// //鎴愬姛浜嬩欢 +// 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 goToVerifyPasswordAction = () => - { - //鍏抽棴瑙i攣楠岃瘉 - GotogoToVerifyPasswordPage(optionType, successAction); - }; +// //璺宠浆鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� +// Action goToVerifyPasswordAction = () => +// { +// //鍏抽棴瑙i攣楠岃瘉 +// GotogoToVerifyPasswordPage(optionType, successAction); +// }; - FaceIDVerification_Show(successAction, goToVerifyPasswordAction); +// FaceIDVerification_Show(successAction, goToVerifyPasswordAction); - } +// } - /// <summary> - /// FaceID楠岃瘉 鍏抽棴瑙i攣璁剧疆 - /// </summary> - /// <param name="action">楠岃瘉鎴愬姛浜嬩欢</param> - void FaceIDVerification_TurnOffUnlock(Action successAction) - { - //璋冩暣鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� - Action goToVerifyPasswordAction = () => - { - //鍏抽棴瑙i攣楠岃瘉 - GotogoToVerifyPasswordPage("4", successAction); - }; +// /// <summary> +// /// FaceID楠岃瘉 鍏抽棴瑙i攣璁剧疆 +// /// </summary> +// /// <param name="action">楠岃瘉鎴愬姛浜嬩欢</param> +// void FaceIDVerification_TurnOffUnlock(Action successAction) +// { +// //璋冩暣鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� +// Action goToVerifyPasswordAction = () => +// { +// //鍏抽棴瑙i攣楠岃瘉 +// GotogoToVerifyPasswordPage("4", successAction); +// }; - FaceIDVerification_Show(successAction, goToVerifyPasswordAction); - } +// FaceIDVerification_Show(successAction, goToVerifyPasswordAction); +// } - /// <summary> - /// 鎸囩汗ID缁熶竴寮瑰嚭 - /// </summary> - /// <param name="optionType"></param> - /// <param name="successAction"></param> - /// <param name="goToVerifyPasswordAction"></param> - void TouchIDVerification_Show(Action successAction, Action goToVerifyPasswordAction) - { - //鎻愮ず鏁板瓧瀵嗙爜楠岃瘉杩樻槸缁樺埗鎵嬪娍楠岃瘉 - string verificationTitleString = GetVerificationTitleString(); +// /// <summary> +// /// 鎸囩汗ID缁熶竴寮瑰嚭 +// /// </summary> +// /// <param name="optionType"></param> +// /// <param name="successAction"></param> +// /// <param name="goToVerifyPasswordAction"></param> +// void TouchIDVerification_Show(Action successAction, Action goToVerifyPasswordAction) +// { +// //鎻愮ず鏁板瓧瀵嗙爜楠岃瘉杩樻槸缁樺埗鎵嬪娍楠岃瘉 +// string verificationTitleString = GetVerificationTitleString(); - TouchIDUtils.Instance.showTouchIDWithDescribe(verificationTitleString, Language.StringByID(StringId.PleaseVerifyTheFingerprint)); - TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) => - { - if (e == TouchIDUtils.TouchIDState.NotSupport) - { - MainPage.Log("KK:褰撳墠璁惧涓嶆敮鎸乀ouchID楠岃瘉,璇疯緭鍏ュ瘑鐮佹潵楠岃瘉"); - goToVerifyPasswordAction?.Invoke(); - } - else if (e == TouchIDUtils.TouchIDState.Success) - { - MainPage.Log("KK:TouchID楠岃瘉鎴愬姛"); - successAction?.Invoke(); - } - else if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) - { - MainPage.Log("KK:鐢ㄦ埛閫夋嫨鎵嬪姩杈撳叆瀵嗙爜"); - goToVerifyPasswordAction?.Invoke(); - } +// TouchIDUtils.Instance.showTouchIDWithDescribe(verificationTitleString, Language.StringByID(StringId.PleaseVerifyTheFingerprint)); +// TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) => +// { +// if (e == TouchIDUtils.TouchIDState.NotSupport) +// { +// MainPage.Log("KK:褰撳墠璁惧涓嶆敮鎸乀ouchID楠岃瘉,璇疯緭鍏ュ瘑鐮佹潵楠岃瘉"); +// goToVerifyPasswordAction?.Invoke(); +// } +// else if (e == TouchIDUtils.TouchIDState.Success) +// { +// MainPage.Log("KK:TouchID楠岃瘉鎴愬姛"); +// successAction?.Invoke(); +// } +// else if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) +// { +// MainPage.Log("KK:鐢ㄦ埛閫夋嫨鎵嬪姩杈撳叆瀵嗙爜"); +// goToVerifyPasswordAction?.Invoke(); +// } - }; - } +// }; +// } - /// <summary> - /// 鎸囩汗ID寮�鍚拰鍏抽棴 5:鎸囩汗ID寮�鍏� - /// </summary> - void TouchIDVerification_SwtichOnOff() - { - //鎸囩汗鍏抽棴鎴愬姛浜嬩欢 鎴愬姛浜嬩欢 - 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(); - } - } - }; +// /// <summary> +// /// 鎸囩汗ID寮�鍚拰鍏抽棴 5:鎸囩汗ID寮�鍏� +// /// </summary> +// void TouchIDVerification_SwtichOnOff() +// { +// //鎸囩汗鍏抽棴鎴愬姛浜嬩欢 鎴愬姛浜嬩欢 +// 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(); +// } +// } +// }; - //5:鎸囩汗ID寮�鍏� - string optionType = "5"; - //璺宠浆鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� - Action goToVerifyPasswordAction = () => - { - //5:鎸囩汗ID寮�鍏� - GotogoToVerifyPasswordPage(optionType, successAction); - }; +// //5:鎸囩汗ID寮�鍏� +// string optionType = "5"; +// //璺宠浆鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� +// Action goToVerifyPasswordAction = () => +// { +// //5:鎸囩汗ID寮�鍏� +// GotogoToVerifyPasswordPage(optionType, successAction); +// }; - TouchIDVerification_Show(successAction, goToVerifyPasswordAction); - } +// TouchIDVerification_Show(successAction, goToVerifyPasswordAction); +// } - /// <summary> - /// TouchID楠岃瘉 4:鍏抽棴瑙i攣璁剧疆 - /// </summary> - /// <param name="action">楠岃瘉鎴愬姛浜嬩欢</param> - void TouchIDVerification_TurnOffUnlock(Action successAction) - { - //璺宠浆鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� - Action goToVerifyPasswordAction = () => - { - //4.鍏抽棴瑙i攣楠岃瘉 - GotogoToVerifyPasswordPage("4", successAction); - }; +// /// <summary> +// /// TouchID楠岃瘉 4:鍏抽棴瑙i攣璁剧疆 +// /// </summary> +// /// <param name="action">楠岃瘉鎴愬姛浜嬩欢</param> +// void TouchIDVerification_TurnOffUnlock(Action successAction) +// { +// //璺宠浆鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� +// Action goToVerifyPasswordAction = () => +// { +// //4.鍏抽棴瑙i攣楠岃瘉 +// GotogoToVerifyPasswordPage("4", successAction); +// }; - TouchIDVerification_Show(successAction, goToVerifyPasswordAction); - } +// TouchIDVerification_Show(successAction, goToVerifyPasswordAction); +// } - /// <summary> - /// 璺宠浆鎵嬪娍鎴栬�呭瘑鐮侀獙璇佺晫闈� - /// </summary> - /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> - /// <param name="successAction"></param> - void GotogoToVerifyPasswordPage(string optionType, Action successAction) - { - if (UserInfo.Current.appUnlockType.Contains("1")) - { - var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, successAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(optionType); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - else if (UserInfo.Current.appUnlockType.Contains("2")) - { - var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, successAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(optionType); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - } +// /// <summary> +// /// 璺宠浆鎵嬪娍鎴栬�呭瘑鐮侀獙璇佺晫闈� +// /// </summary> +// /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> +// /// <param name="successAction"></param> +// void GotogoToVerifyPasswordPage(string optionType, Action successAction) +// { +// if (UserInfo.Current.appUnlockType.Contains("1")) +// { +// var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, successAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(optionType); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// else if (UserInfo.Current.appUnlockType.Contains("2")) +// { +// var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, successAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(optionType); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// } - /// <summary> - /// 鍒ゆ柇鏄惁鏁板瓧楠岃瘉銆佸惁鍒欑粯鍒舵墜鍔块獙璇� - /// </summary> - /// <returns></returns> - bool CheckIfUnlockPassword() - { - return UserInfo.Current.appUnlockType.Contains("1"); - } +// /// <summary> +// /// 鍒ゆ柇鏄惁鏁板瓧楠岃瘉銆佸惁鍒欑粯鍒舵墜鍔块獙璇� +// /// </summary> +// /// <returns></returns> +// bool CheckIfUnlockPassword() +// { +// return UserInfo.Current.appUnlockType.Contains("1"); +// } - /// <summary> - /// 鍒ゆ柇鏄惁鏁板瓧楠岃瘉銆佸惁鍒欑粯鍒舵墜鍔块獙璇� - /// </summary> - /// <returns></returns> - string GetVerificationTitleString() - { - if (CheckIfUnlockPassword()) - { - return Language.StringByID(StringId.PasswordVerification); - } - else - { - return Language.StringByID(StringId.GestureVerification); - } - } - } -} \ No newline at end of file +// /// <summary> +// /// 鍒ゆ柇鏄惁鏁板瓧楠岃瘉銆佸惁鍒欑粯鍒舵墜鍔块獙璇� +// /// </summary> +// /// <returns></returns> +// string GetVerificationTitleString() +// { +// if (CheckIfUnlockPassword()) +// { +// return Language.StringByID(StringId.PasswordVerification); +// } +// else +// { +// return Language.StringByID(StringId.GestureVerification); +// } +// } +// } +//} \ No newline at end of file -- Gitblit v1.8.0