From 557c8c4f75aafc97533721766272410042440d34 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期六, 21 八月 2021 11:00:29 +0800
Subject: [PATCH] 安防功能
---
HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs | 49 +++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 41 insertions(+), 8 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs
index ff630c4..61fff82 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs
@@ -40,6 +40,12 @@
///
/// </summary>
FrameLayout bodyView;
+
+ /// <summary>
+ /// 鏄惁鐐瑰嚮浜嗚繑鍥烇紝鐢ㄤ簬灞忚斀EditText澶卞幓鐒︾偣妫�娴嬩簨浠�
+ /// </summary>
+ bool isHitBack;
+
#endregion
public ResetPasswordPage()
@@ -50,7 +56,13 @@
public void LoadPage()
{
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
- new TopViewDiv(bodyView, Language.StringByID(StringId.ModifyPassword)).LoadTopView();
+
+ Action backAction = () =>
+ {
+ isHitBack = true;
+ };
+
+ new TopViewDiv(bodyView, Language.StringByID(StringId.ModifyPassword)).LoadTopView(backAction);
#region 鏂板瘑鐮�
FrameLayout rowView = new FrameLayout()
@@ -83,9 +95,8 @@
Foucs = true
};
rowView.AddChidren(etPassword);
- var lineView = new LineView();
+ var lineView = new LineView(rowView.Height);
rowView.AddChidren(lineView);
- lineView.Y = rowView.Height - lineView.Height;
#endregion
#region 鍐嶆杈撳叆鏂板瘑鐮�
@@ -126,8 +137,8 @@
Gravity = Gravity.CenterHorizontal,
Y = Application.GetRealHeight(224),
Width = Application.GetRealWidth(220),
- Height = Application.GetRealHeight(44),
- Radius = (uint)Application.GetRealHeight(22),
+ Height = Application.GetRealWidth(44),
+ Radius = (uint)Application.GetRealWidth(22),
SelectedBackgroundColor = CSS_Color.MainColor,
BackgroundColor = CSS_Color.PromptingColor1,
TextID = StringId.Confirm,
@@ -184,6 +195,7 @@
{
CloseTime = 1,
Direction = AMPopTipDirection.None,
+ MaxWidth = Application.GetRealWidth(300),
Text = Language.StringByID(StringId.IncorrectRepeatPassword)
}.Show(bodyView);
@@ -191,8 +203,9 @@
}
var waitPage = new Loading();
- waitPage.Start("Please wait...");
-
+ bodyView.AddChidren(waitPage);
+ waitPage.Start(Language.StringByID(StringId.PleaseWait));
+
new Thread(() =>
{
try
@@ -218,7 +231,11 @@
{
Application.RunOnMainThread(() =>
{
- waitPage.Hide();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
@@ -253,6 +270,10 @@
}
else
{
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
+ if (etPassword.Text.Length == 0) return;//娌¤緭鍏ヤ笉妫�娴嬫彁绀�
+
//鏍¢獙瀵嗙爜鏄惁绗﹀悎瑕佹眰
if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13)
{
@@ -279,6 +300,10 @@
}
else
{
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
+ if (etRepeatPassword.Text.Length == 0) return;//娌¤緭鍏ヤ笉妫�娴嬫彁绀�
+
//鏍¢獙涓ゆ杈撳叆鐨勫瘑鐮佹槸鍚︿竴鑷�
if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim())
{
@@ -286,6 +311,7 @@
{
CloseTime = 1,
Direction = AMPopTipDirection.None,
+ MaxWidth = Application.GetRealWidth(300),
Text = Language.StringByID(StringId.IncorrectRepeatPassword)
}.Show(bodyView);
}
@@ -296,6 +322,13 @@
}
};
+ Action<View, string> textChangeEventHandler = (view, textStr) =>
+ {
+ LoadMothed_EnableResetButton();
+ };
+ etPassword.TextChangeEventHandler += textChangeEventHandler;
+ etRepeatPassword.TextChangeEventHandler += textChangeEventHandler;
+
}
/// <summary>
--
Gitblit v1.8.0