From f96d6e7fb045f2be98300ada72c1c76f726005eb Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 16 十二月 2020 15:33:02 +0800
Subject: [PATCH] 2020-12-16 1.面容指纹解锁开关,通过数字验证问题修复。
---
HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs | 86 ++++++++++++---------
.vs/HDL_APP_Project/xs/UserPrefs.xml | 23 +++++
HDL_ON/UI/UI0-Public/AppUnlockPage.cs | 109 ++++++++++++++++++---------
3 files changed, 142 insertions(+), 76 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 5659134..be7eb38 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,12 +1,31 @@
锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
<MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" />
- <MonoDevelop.Ide.Workbench>
+ <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs">
+ <Files>
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPageBLL.cs" Line="1" Column="1" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs" Line="374" Column="30" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs" Line="359" Column="1" />
+ <File FileName="HDL_ON/UI/UI0-Public/AppUnlockPage.cs" Line="138" Column="10" />
+ <File FileName="HDL_ON/UI/UI0-Public/TopViewDivBLL.cs" Line="17" Column="27" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs" Line="1" Column="1" />
+ </Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="HDL_APP_Project" expanded="True">
- <Node name="HDL_ON" expanded="True" selected="True">
+ <Node name="HDL_ON" expanded="True">
<Node name="Common" expanded="True" />
+ <Node name="UI" expanded="True">
+ <Node name="UI0-Public" expanded="True" />
+ <Node name="UI2" expanded="True">
+ <Node name="4-PersonalCenter" expanded="True">
+ <Node name="MemberManagement" expanded="True" />
+ <Node name="UnlockSetting" expanded="True">
+ <Node name="AppUnlockSettingsPageBLL.cs" selected="True" />
+ </Node>
+ </Node>
+ </Node>
+ </Node>
</Node>
<Node name="HDL-ON_Android" expanded="True" />
<Node name="HDL-ON_iOS" expanded="True">
diff --git a/HDL_ON/UI/UI0-Public/AppUnlockPage.cs b/HDL_ON/UI/UI0-Public/AppUnlockPage.cs
index 63a6b1d..5b1b28d 100644
--- a/HDL_ON/UI/UI0-Public/AppUnlockPage.cs
+++ b/HDL_ON/UI/UI0-Public/AppUnlockPage.cs
@@ -103,7 +103,7 @@
TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.PleaseVerifyTheFingerprint));
};
//鍔犺浇UI椤甸潰
- LoadGesturePage("7", fingerAction);
+ LoadGesturePage("7", fingerAction, null);
TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.PleaseVerifyTheFingerprint));
TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) =>
@@ -140,7 +140,10 @@
/// <summary>
/// 鍔犺浇鎸囩汗楠岃瘉鐣岄潰
/// </summary>
- public void LoadGesturePage(string optionType, Action fingerAction)
+ /// <param name="optionType"></param>
+ /// <param name="fingerAction"></param>
+ /// <param name="successAction"></param>
+ public void LoadGesturePage(string optionType, Action fingerAction, Action successAction)
{
var bodyView = new FrameLayout()
{
@@ -194,25 +197,37 @@
{
///灏嗛獙璇佹寚绾圭殑椤甸潰绉婚櫎
MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
- Action action = () =>
- {
- UserInfo.Current.unlockTime = DateTime.Now;
- };
- if (UserInfo.Current.appUnlockType.Contains("1"))
- {
- var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, action);
- 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, action);
- MainPage.BasePageView.AddChidren(page);
- page.LoadPage(optionType);
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- }
+ //Action action = () =>
+ //{
+ // UserInfo.Current.unlockTime = DateTime.Now;
+ //};
+ //if (UserInfo.Current.appUnlockType.Contains("1"))
+ //{
+ // var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, action);
+ // 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, action);
+ // MainPage.BasePageView.AddChidren(page);
+ // page.LoadPage(optionType);
+ // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ //}
+ if (successAction == null)
+ {
+ Action action = () =>
+ {
+ UserInfo.Current.unlockTime = DateTime.Now;
+ };
+ GotogoToVerifyPasswordPage(optionType, action);
+ }
+ else
+ {
+ GotogoToVerifyPasswordPage(optionType, successAction);
+ }
};
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
@@ -238,7 +253,7 @@
TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.VerifyFaceID));
};
//鍔犺浇UI椤甸潰
- LoadFaceIDGesturePage("7", faceIDAction);
+ LoadFaceIDGesturePage("7", faceIDAction, null);
TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.VerifyFaceID));
TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) =>
@@ -273,9 +288,12 @@
}
/// <summary>
- /// 鍔犺浇闈㈠ID楠岃瘉鐣岄潰
+ /// 鍔犺浇闈㈠ID楠岃瘉鐣岄潰
/// </summary>
- public void LoadFaceIDGesturePage(string optionType, Action faceIDAction)
+ /// <param name="optionType"></param>
+ /// <param name="faceIDAction"></param>
+ /// <param name="successAction">鎸囧畾鎴愬姛鐨勪簨浠跺洖璋�</param>
+ public void LoadFaceIDGesturePage(string optionType, Action faceIDAction, Action successAction)
{
var bodyView = new FrameLayout()
{
@@ -329,23 +347,18 @@
{
///灏嗛獙璇侀潰瀹笽D鐨勯〉闈㈢Щ闄�
MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
- Action action = () =>
+
+ if (successAction == null)
{
- UserInfo.Current.unlockTime = DateTime.Now;
- };
- if (UserInfo.Current.appUnlockType.Contains("1"))
- {
- var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, action);
- MainPage.BasePageView.AddChidren(page);
- page.LoadPage(optionType);
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ Action action = () =>
+ {
+ UserInfo.Current.unlockTime = DateTime.Now;
+ };
+ GotogoToVerifyPasswordPage(optionType, action);
}
- else if (UserInfo.Current.appUnlockType.Contains("2"))
+ else
{
- var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, action);
- MainPage.BasePageView.AddChidren(page);
- page.LoadPage(optionType);
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ GotogoToVerifyPasswordPage(optionType, successAction);
}
};
@@ -354,5 +367,27 @@
}
+ /// <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;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs
index 496648d..a212c2b 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs
@@ -327,11 +327,33 @@
//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));
@@ -339,24 +361,7 @@
{
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)
@@ -410,12 +415,34 @@
{
//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));
@@ -423,23 +450,8 @@
{
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)
--
Gitblit v1.8.0