From 76fca0e9a011eb36081e34b875a5d7399d4de3e9 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 09 五月 2023 09:10:59 +0800
Subject: [PATCH] 优化登录界面键盘推动界面
---
HDL_ON/UI/UI1-Login/LoginPageBLL.cs | 112 ++++++++++++++++++++++++++++++++++---------------------
1 files changed, 69 insertions(+), 43 deletions(-)
diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
index e2fbe02..c540ce6 100644
--- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -435,6 +435,16 @@
{
btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor;
btnPasswordViewBottomLine.Height = Application.GetRealHeight(2);
+ new Thread(() => {
+ for(var i = 0; i < 10; i++)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ this.Y = 0-Application.GetRealHeight(10 * i);
+ });
+ Thread.Sleep(10);
+ }
+ }) { IsBackground = true }.Start();
}
else
{
@@ -451,9 +461,14 @@
//褰撶劍鐐瑰湪瀵嗙爜鏂囨湰妗嗘椂锛岀偣鍑婚敭鐩樺洖鎾ゆ寜閿紝瑙﹀彂鐨勪簨浠�
etPassword.EditorEnterAction += (obj) =>
{
+ LoginEvent();
Application.HideSoftInput();
};
etPassword.MouseUpEventHandler = (sender, e) =>
+ {
+ etPassword.Foucs = true;
+ };
+ etPassword.MouseDownEventHandler = (sender, e) =>
{
etPassword.Foucs = true;
};
@@ -486,49 +501,7 @@
{
btnLogin.MouseUpEventHandler += (sender, e) =>
{
- if (btnLogin.IsSelected)
- {
- //鍒ゆ柇鏄惁鍚屾剰浜嗛殣绉佹斂绛�
- if (CheckPrivacyPolicy() == false) return;
-
- account = etAccount.Text.Trim();
- password = etPassword.Text.Trim();
-
- if (loginType == 0)
- {
- if (!Utlis.CheckPhoneNumber(account, phoneZoneCode))
- {
- var tip = new Tip()
- {
- MaxWidth = Application.GetRealWidth(300),
- Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
- CloseTime = 1,
- Direction = AMPopTipDirection.None
- };
- tip.Show(bodyView);
- return;
- }
- }
- else
- {
- if (!Utlis.CheckEmail(account))
- {
- var tip = new Tip()
- {
- Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
- CloseTime = 1,
- Direction = AMPopTipDirection.None
- };
- tip.Show(bodyView);
- return;
- }
- }
-
- //鍒涘缓鐧诲綍绾跨▼
- var loginThread = LoadThread_Login();
- waitPage = new Loading();
- new PublicAssmebly().LoadPage_WaitPage(loginThread, bodyView, waitPage);
- }
+ LoginEvent();
};
#region 褰撹处鍙峰瘑鐮侀兘杈撳叆鏃讹紝鎵嶈兘鐐瑰嚮鐧诲綍鎸夐挳
etAccount.TextChangeEventHandler = (sender, e) =>
@@ -566,7 +539,58 @@
};
#endregion
}
+ /// <summary>
+ /// 鐧诲綍浜嬩欢
+ /// </summary>
+ void LoginEvent()
+ {
+ if (btnLogin.IsSelected)
+ {
+ //鍒ゆ柇鏄惁鍚屾剰浜嗛殣绉佹斂绛�
+ if (CheckPrivacyPolicy() == false)
+ {
+ Application.HideSoftInput();
+ return;
+ }
+ account = etAccount.Text.Trim();
+ password = etPassword.Text.Trim();
+ if (loginType == 0)
+ {
+ if (!Utlis.CheckPhoneNumber(account, phoneZoneCode))
+ {
+ var tip = new Tip()
+ {
+ MaxWidth = Application.GetRealWidth(300),
+ Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
+ CloseTime = 1,
+ Direction = AMPopTipDirection.None
+ };
+ tip.Show(bodyView);
+ return;
+ }
+ }
+ else
+ {
+ if (!Utlis.CheckEmail(account))
+ {
+ var tip = new Tip()
+ {
+ Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
+ CloseTime = 1,
+ Direction = AMPopTipDirection.None
+ };
+ tip.Show(bodyView);
+ return;
+ }
+ }
+
+ //鍒涘缓鐧诲綍绾跨▼
+ var loginThread = LoadThread_Login();
+ waitPage = new Loading();
+ new PublicAssmebly().LoadPage_WaitPage(loginThread, bodyView, waitPage);
+ }
+ }
/// <summary>
/// 鍔犺浇鐧诲綍绾跨▼
/// </summary>
@@ -893,6 +917,8 @@
{
//2020-12-22 澧炲姞鐐瑰嚮闅愯棌閿洏浜嬩欢
Application.HideSoftInput();
+ this.Y = 0;
+
//鍒ゆ柇鏄惁鍚屾剰浜嗛殣绉佹斂绛�
if (CheckPrivacyPolicy() == false) return;
--
Gitblit v1.8.0