From c3e1b733fc45bd9f0b88bfb560cfa87a270b079b Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 09 九月 2020 17:33:58 +0800
Subject: [PATCH] 20200909
---
HDL_ON/UI/UI0-Public/AppUnlockPage.cs | 75 +++++++++++++++++++++++++++----------
1 files changed, 54 insertions(+), 21 deletions(-)
diff --git a/HDL_ON/UI/UI0-Public/AppUnlockPage.cs b/HDL_ON/UI/UI0-Public/AppUnlockPage.cs
index 30eab49..a36a036 100644
--- a/HDL_ON/UI/UI0-Public/AppUnlockPage.cs
+++ b/HDL_ON/UI/UI0-Public/AppUnlockPage.cs
@@ -5,18 +5,24 @@
/// <summary>
/// app瑙i攣鐣岄潰
/// </summary>
- public class AppUnlockPage
+ public class AppUnlockPage
{
- DateTime unlockTime = DateTime.MinValue;
- void LoadOption()
+ DateTime unlockTime = DateTime.MinValue;
+ void LoadOption()
{
- Action action = () => {
+ if (MainPage.LoginUser == null)
+ {
+ return;
+ }
+ Action action = () =>
+ {
unlockTime = DateTime.Now;
};
//1:楠岃瘉鎸囩汗
if (MainPage.LoginUser.appUnlockType.Contains("3"))
{
- Action fAction = () => {
+ Action fAction = () =>
+ {
LoadOption();
};
LoadGesturePage("7", fAction);
@@ -27,13 +33,12 @@
{
MainPage.Log("KK:TouchID楠岃瘉鎴愬姛");
unlockTime = DateTime.Now;
- MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 1);
+ MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
}
else
{
///灏嗛獙璇佹寚绾圭殑椤甸潰绉婚櫎
- MainPage.BasePageView.RemoveAt( MainPage.BasePageView.ChildrenCount - 1);
-
+ MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
if (MainPage.LoginUser.appUnlockType.Contains("1"))
{
var page = new AppUnlockPasswordPage(MainPage.LoginUser.appUnlockPasswrod, action);
@@ -48,6 +53,7 @@
page.LoadPage("7");
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
}
+
}
};
}
@@ -61,18 +67,36 @@
var page = new AppUnlockPasswordPage(MainPage.LoginUser.appUnlockPasswrod, action);
MainPage.BasePageView.AddChidren(page);
page.LoadPage("7");
- 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");
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
}
+#if __ANDROID__
+ new System.Threading.Thread(() =>
+ {
+ int i = 0;
+ while (i > 1)
+ {
+ MainPage.Log($"鍊掕鏃讹細{i} sec");
+ System.Threading.Thread.Sleep(1000);
+ i++;
+ }
+ Application.RunOnMainThread(() =>
+ {
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ });
+ })
+ { IsBackground = true }.Start();
+#else
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+#endif
+
}
- public void LoadPage()
+ public void LoadPage()
{
LoadOption();
}
@@ -80,8 +104,10 @@
/// <summary>
/// 鍔犺浇鎸囩汗楠岃瘉鐣岄潰
/// </summary>
- public void LoadGesturePage(string optionType,Action fingerAction)
+ public void LoadGesturePage(string optionType, Action fingerAction)
{
+ //Dialog dialog = new Dialog();
+
if (optionType == "7")
{
if (unlockTime.AddSeconds(60) > DateTime.Now || MainPage.LoginUser.appUnlockPasswrod == "" || MainPage.LoginUser.appUnlockPage.Count == 0)
@@ -94,9 +120,9 @@
BackgroundColor = CSS.CSS_Color.MainBackgroundColor
};
MainPage.BasePageView.AddChidren(bodyView);
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- bodyView.AddChidren(new Button() {
+ bodyView.AddChidren(new Button()
+ {
Height = Application.GetRealHeight(64),
BackgroundColor = CSS.CSS_Color.BackgroundColor,
});
@@ -121,7 +147,8 @@
};
bodyView.AddChidren(btnFingerIcon);
- btnFingerIcon.MouseUpEventHandler = (sender, e) => {
+ btnFingerIcon.MouseUpEventHandler = (sender, e) =>
+ {
fingerAction();
};
@@ -132,15 +159,16 @@
TextAlignment = TextAlignment.Center,
TextColor = CSS.CSS_Color.MainColor,
TextSize = CSS.CSS_FontSize.TextFontSize,
- TextID = MainPage.LoginUser.appUnlockType.Contains("1") ? StringId.VerifyDigitalPassword : StringId.VerifyGesturePassword
+ TextID = MainPage.LoginUser.appUnlockType.Contains("1") ? StringId.VerifyDigitalPassword : StringId.VerifyGesturePassword,
};
bodyView.AddChidren(btnOtherVerify);
- btnOtherVerify.MouseUpEventHandler = (sender, e) => {
+ btnOtherVerify.MouseUpEventHandler = (sender, e) =>
+ {
///灏嗛獙璇佹寚绾圭殑椤甸潰绉婚櫎
- MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 1);
-
- Action action = () => {
+ MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
+ Action action = () =>
+ {
unlockTime = DateTime.Now;
};
if (MainPage.LoginUser.appUnlockType.Contains("1"))
@@ -157,8 +185,13 @@
page.LoadPage(optionType);
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
}
+
};
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+
+ //dialog.Show();
+ Console.WriteLine("-0987654321");
}
}
-}
+}
\ No newline at end of file
--
Gitblit v1.8.0