From 8df24b0a3dfd5b6f39c5393ef24eab25b70ab858 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 11 九月 2020 13:18:33 +0800
Subject: [PATCH] 202009111
---
HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs | 144 +++++++++++++++++++++++++++++++++++++-----------
1 files changed, 111 insertions(+), 33 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs
index 034b02e..8f230d3 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs
@@ -42,7 +42,7 @@
Gravity = Gravity.CenterHorizontal,
Width = Application.GetRealWidth(64),
Height = Application.GetRealWidth(64),
- UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/GestureGrayIcon.png",
+ //UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/GestureGrayIcon.png",
};
bodyView.AddChidren(btnGestureIcon);
@@ -54,7 +54,7 @@
IsBold = true,
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.EmphasisFontSize_Secondary,
- TextID = StringId.SetGesturePassword,
+ TextID = optionType == "7" ? StringId.SetGesturePassword : StringId.VerifyGesturePassword,
};
bodyView.AddChidren(btnTipTitle);
@@ -67,10 +67,9 @@
TextColor = CSS_Color.TextualColor,
SelectedTextColor = CSS_Color.WarningColor,
TextSize = CSS_FontSize.TextFontSize,
- TextID = string.IsNullOrEmpty(oldPasswrod) ? StringId.DrawUnlockPattern : StringId.DrawUnlockPatternAgain,
+ TextID = optionType == "2" ? StringId.DrawUnlockPatternAgain : StringId.DrawUnlockPattern,
};
bodyView.AddChidren(btnTipMsg);
-
if (optionType == "7")
{
@@ -83,19 +82,17 @@
Gravity = Gravity.CenterHorizontal,
Width = Application.GetRealWidth(215),
Height = Application.GetRealWidth(215),
- //LockViewCorrectColor = 0xFF00FF00,//榛樿鍜屾纭� 鏃舵樉绀虹殑棰滆壊
- //LockViewErrorColor = 0xFFFF0000, //閿欒鏃� 鏄剧ず鐨勯鑹�
+ LockViewCorrectColor = CSS_Color.MainColor,//0xFF00FF00,//榛樿鍜屾纭� 鏃舵樉绀虹殑棰滆壊
+ LockViewErrorColor = 0xFFFF0000, //閿欒鏃� 鏄剧ず鐨勯鑹�
BackgroundColor = CSS_Color.BackgroundColor,
};
bodyView.AddChidren(mGestureLockView);
-
+ mGestureLockView.SetSolidType(true);
//婊戝姩缁撴潫 鍥炶皟瀵嗙爜缁撴灉鍜屽瘑鐮侀暱搴�
mGestureLockView.OnLockVerifyEvent += (selectNumStr, selectCount) =>
{
//鑷楠岃瘉瀵嗙爜锛屾彁绀烘纭垨鑰呴敊璇� false涓烘樉绀虹孩鑹查敊璇�, 鑷閫夋嫨璋冪敤鏃舵満
mGestureLockView.showCorrectStatus(false);
- Console.WriteLine("鎵嬪娍瀵嗙爜 : " + selectNumStr + " selectCount:" + selectCount);
-
if (selectCount < 4)
{
btnTipMsg.Text = Language.StringByID(StringId.DrawingLengthError);
@@ -107,23 +104,22 @@
if (string.IsNullOrEmpty(oldPasswrod))
{
+ this.RemoveFromParent();
var page = new AppUnlockGesturePage(passwrod, backAction);
MainPage.BasePageView.AddChidren(page);
page.LoadPage(optionType);
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- //绉婚櫎褰撳墠鐣岄潰锛屾瘡娆¤繑鍥為兘杩斿洖鍒版渶涓婄骇
- MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 2);
}
else
{
if (optionType == "2")
{
+ //绉婚櫎褰撳墠鐣岄潰锛屾瘡娆¤繑鍥為兘杩斿洖鍒版渶涓婄骇
+ this.RemoveFromParent();
var page = new AppUnlockGesturePage("", backAction);
MainPage.BasePageView.AddChidren(page);
page.LoadPage("1");
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- //绉婚櫎褰撳墠鐣岄潰锛屾瘡娆¤繑鍥為兘杩斿洖鍒版渶涓婄骇
- MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 2);
return;
}
if(optionType == "7")
@@ -153,7 +149,7 @@
}
if (MainPage.LoginUser.appUnlockType.Contains("2"))
{
- MainPage.LoginUser.appUnlockType.Remove("2");
+ MainPage.LoginUser.appUnlockType = new System.Collections.Generic.List<string>();
MainPage.LoginUser.appUnlockPasswrod = "";
MainPage.LoginUser.SaveUserInfo();
this.RemoveFromParent();
@@ -172,15 +168,23 @@
{
if (passwrod == oldPasswrod)
{
- if (optionType == "5" && MainPage.LoginUser.appUnlockType.Contains("3"))
+ if (optionType == "5" )//&& MainPage.LoginUser.appUnlockType.Contains("3"))
{
- MainPage.LoginUser.appUnlockType.Remove("3");
+ if (MainPage.LoginUser.appUnlockType.Contains("3"))
+ MainPage.LoginUser.appUnlockType.Remove("3");
+ else
+ MainPage.LoginUser.appUnlockType.Add("3");
+
MainPage.LoginUser.SaveUserInfo();
this.RemoveFromParent();
}
- if (MainPage.LoginUser.appUnlockType.Contains("4") && optionType == "6")
+ if ( optionType == "6")
{
- MainPage.LoginUser.appUnlockType.Remove("4");
+ if (MainPage.LoginUser.appUnlockType.Contains("4"))
+ MainPage.LoginUser.appUnlockType.Remove("4");
+ else
+ MainPage.LoginUser.appUnlockType.Add("4");
+
MainPage.LoginUser.SaveUserInfo();
this.RemoveFromParent();
}
@@ -215,27 +219,30 @@
//page.LoadPage(true, Language.StringByID(StringId.SetSuccessfully), Language.StringByID(StringId.SetSuccessfully), "");
string tipMsg = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? Language.StringByID(StringId.TurnOnFingerprintUnlocking) :
Language.StringByID(StringId.TurnOnFaceIdUnlocking);
- Action<bool> action = (result) =>
+ if (TouchIDUtils.getTouchIDSupperType() != TouchIDUtils.TouchIDSupperType.None)
{
- var unlockType = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? "3" : "4";
- if (result)
+ Action<bool> action = (result) =>
{
- if (!MainPage.LoginUser.appUnlockType.Contains(unlockType))
+ var unlockType = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? "3" : "4";
+ if (result)
{
- MainPage.LoginUser.appUnlockType.Add(unlockType);
+ if (!MainPage.LoginUser.appUnlockType.Contains(unlockType))
+ {
+ MainPage.LoginUser.appUnlockType.Add(unlockType);
+ }
}
- }
- else
- {
- if (MainPage.LoginUser.appUnlockType.Contains(unlockType))
+ else
{
- MainPage.LoginUser.appUnlockType.Remove(unlockType);
+ if (MainPage.LoginUser.appUnlockType.Contains(unlockType))
+ {
+ MainPage.LoginUser.appUnlockType.Remove(unlockType);
+ }
}
- }
- MainPage.LoginUser.SaveUserInfo();
- backAction();
- };
- page.AdditionalOperations(tipMsg, action);
+ MainPage.LoginUser.SaveUserInfo();
+ backAction();
+ };
+ page.AdditionalOperations(tipMsg, action);
+ }
if (!MainPage.LoginUser.appUnlockType.Contains("2"))
{
MainPage.LoginUser.appUnlockType.Add("2");
@@ -253,7 +260,78 @@
};
+ if (optionType == "5" || optionType == "6" || optionType == "7")
+ {
+ Button btnLoginAccountVerify = new Button()
+ {
+ Y = Application.GetRealHeight(517),
+ Height =Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.Center,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextColor = CSS_Color.MainColor,
+ TextID = StringId.EnterLoginPasswordVerification,
+ };
+ bodyView.AddChidren(btnLoginAccountVerify);
+ btnLoginAccountVerify.MouseUpEventHandler = (sender, e) =>
+ {
+ if (optionType == "7")
+ {
+ MainPage.GoLoginPage(MainPage.LoginUser);
+ }
+ else
+ {
+ Action<string> action = (pw) => {
+ var loginResult = new DAL.Server.HttpServerRequest().LoginByPassword(MainPage.LoginUser.accountString, pw);
+ if (loginResult.StateCode.ToUpper() == "SUCCESS")
+ {
+ MainPage.LoginUser.appUnlockPasswrod = "";
+ MainPage.LoginUser.appUnlockType = new System.Collections.Generic.List<string>();
+ MainPage.LoginUser.SaveUserInfo();
+ this.RemoveFromParent();
+ backAction();
+ }
+ //鐧诲綍澶辫触
+ else
+ {
+ string tipStr = "Sever erorr";
+ switch (loginResult.StateCode)
+ {
+ case "ValidCodeAndPhoneNoEqual":
+ tipStr = Language.StringByID(StringId.VerificationCodeError);
+ break;
+ case "USERNAMEORPWDERROR":
+ tipStr = Language.StringByID(StringId.LoginFailed_AccountOrPasswordError);
+ break;
+ case "ACCOUNTNOEXISTS":
+ tipStr = Language.StringByID(StringId.ACCOUNTNOEXISTS);
+ break;
+ case "NoRecord":
+ tipStr = Language.StringByID(StringId.PlsGetTheVerificationCode);
+ break;
+ case "Self:Net_Error":
+ tipStr = Language.StringByID(StringId.NetworkAnomaly);
+ break;
+ }
+ //璐﹀彿鎴栬�呭瘑鐮侀敊璇�
+ Application.RunOnMainThread(() =>
+ {
+ //鎻愮ず鍘熷洜
+ var tip = new Tip()
+ {
+ Text = tipStr,
+ CloseTime = 1,
+ Direction = AMPopTipDirection.None
+ };
+ tip.Show(bodyView);
+ });
+ }
+
+ };
+ new PublicAssmebly().LoadDialog_EditParater(StringId.EnterLoginPasswordVerification, "", action,StringId.PlsEntryPassword,0,new System.Collections.Generic.List<string>(),true);
+ }
+ };
+ }
}
}
}
\ No newline at end of file
--
Gitblit v1.8.0