From 1bb8683aef25143048e572b65734de4772bfc712 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 11 十二月 2020 10:48:17 +0800
Subject: [PATCH] Merge branch 'CJL-NEW'
---
HDL_ON/Common/Constant.cs | 19 +
DLL/Shared.IOS.TBL.dll | 0
HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs | 10
DLL/Shared.Droid.xml | 11
HDL-ON_iOS/AppDelegate.cs | 1
HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs | 174 +++++++++++--
HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs | 29 ++
DLL/Shared.IOS.xml | 47 +++
HDL_ON/UI/UI1-Login/RegisterPage.cs | 29 +
DLL/Shared.IOS.dll | 0
HDL_ON/Common/HDLCommon.cs | 34 ++
HDL_ON/DAL/Server/HttpUtil.cs | 78 +++++
HDL_ON/UI/UI1-Login/RegisterPageBLL.cs | 242 ++++++++++++-------
DLL/Shared.Droid.HDLWidget.dll | 0
DLL/Shared.Droid.dll | 0
HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs | 15
16 files changed, 527 insertions(+), 162 deletions(-)
diff --git a/DLL/Shared.Droid.HDLWidget.dll b/DLL/Shared.Droid.HDLWidget.dll
index edc580f..e2a1608 100644
--- a/DLL/Shared.Droid.HDLWidget.dll
+++ b/DLL/Shared.Droid.HDLWidget.dll
Binary files differ
diff --git a/DLL/Shared.Droid.dll b/DLL/Shared.Droid.dll
index 9379ed5..8c4fcf4 100644
--- a/DLL/Shared.Droid.dll
+++ b/DLL/Shared.Droid.dll
Binary files differ
diff --git a/DLL/Shared.Droid.xml b/DLL/Shared.Droid.xml
index 608df93..8443fe6 100644
--- a/DLL/Shared.Droid.xml
+++ b/DLL/Shared.Droid.xml
@@ -2681,6 +2681,17 @@
璁剧疆PickerView 閫変腑鏂囧瓧鐨勯鑹�
</summary>
</member>
+ <member name="P:Shared.UIPickerView.TextSize">
+ <summary>
+ 鏂囧瓧澶у皬
+ </summary>
+ <value>The size of the text.</value>
+ </member>
+ <member name="P:Shared.UIPickerView.PickerBackgroundColor">
+ <summary>
+ 鑳屾櫙棰滆壊
+ </summary>
+ </member>
<member name="F:Shared.UIPickerView.mOnSelectChangeListener">
<summary>
OnProgressChangeListener 缁ф壙鍝嶅簲浜嬩欢
diff --git a/DLL/Shared.IOS.TBL.dll b/DLL/Shared.IOS.TBL.dll
index de9322f..d96cc12 100644
--- a/DLL/Shared.IOS.TBL.dll
+++ b/DLL/Shared.IOS.TBL.dll
Binary files differ
diff --git a/DLL/Shared.IOS.dll b/DLL/Shared.IOS.dll
index 74dd958..1575ccf 100644
--- a/DLL/Shared.IOS.dll
+++ b/DLL/Shared.IOS.dll
Binary files differ
diff --git a/DLL/Shared.IOS.xml b/DLL/Shared.IOS.xml
index 23e0121..ff15121 100644
--- a/DLL/Shared.IOS.xml
+++ b/DLL/Shared.IOS.xml
@@ -129,6 +129,11 @@
UI澶勭悊绫�
</summary>
</member>
+ <member name="F:Shared.Application.IsEditTextContentTypePassword">
+ <summary>
+ EditText鏄惁榛樿瀵嗙爜杈撳叆鏂瑰紡
+ </summary>
+ </member>
<member name="P:Shared.Application.IsFullScreen">
<summary>
2020-06-23
@@ -276,6 +281,12 @@
<summary>
鍏抽棴瀹氫綅鏈嶅姟
</summary>
+ </member>
+ <member name="M:Shared.Application.SetStatusBarTextBlack(System.Boolean)">
+ <summary>
+ 璁剧疆椤堕儴鐘舵�佹爮瀛椾綋棰滆壊
+ </summary>
+ <param name="isBlack">鏄惁璁剧疆榛戣壊</param>
</member>
<member name="T:Shared.Button">
<summary>
@@ -2971,6 +2982,17 @@
璁剧疆PickerView 閫変腑鏂囧瓧鐨勯鑹�
</summary>
</member>
+ <member name="P:Shared.UIPickerView.TextSize">
+ <summary>
+ 鏂囧瓧澶у皬
+ </summary>
+ <value>The size of the text.</value>
+ </member>
+ <member name="P:Shared.UIPickerView.PickerBackgroundColor">
+ <summary>
+ 鑳屾櫙棰滆壊
+ </summary>
+ </member>
<member name="F:Shared.UIPickerView.OnSelectChangeEvent">
<summary>
Action
@@ -3240,16 +3262,6 @@
褰撳墠杩涘害鍊�
</summary>
<value>杩涘害鍊�</value>
- </member>
- <member name="P:Shared.CurtainRollSeekBar.CurtainPaddingLeftRight">
- <summary>
- 杩涘害鏉′笌宸﹀彸杈规杈硅窛
- </summary>
- </member>
- <member name="P:Shared.CurtainRollSeekBar.CurtainPaddingTop">
- <summary>
- 椤堕儴padding
- </summary>
</member>
<member name="P:Shared.CurtainRollSeekBar.IsOffline">
<summary>
@@ -4285,6 +4297,11 @@
</summary>
<value>X鍧愭爣</value>
</member>
+ <member name="P:Shared.DiyImageSeekBar.IsInvertedProgress">
+ <summary>
+ 杩涘害鍊兼槸鍚﹀彇鍙�
+ </summary>
+ </member>
<member name="F:Shared.DiyImageSeekBar.OnProgressChangedEvent">
<summary>
EventHandler
@@ -4721,6 +4738,11 @@
璁剧疆鏄惁涓虹櫨鍙剁獥鏍峰紡
</summary>
</member>
+ <member name="P:Shared.CurtainRollSeekBarOn.IsInvertedProgress">
+ <summary>
+ 杩涘害鍊兼槸鍚﹀彇鍙�
+ </summary>
+ </member>
<member name="F:Shared.CurtainRollSeekBarOn.OnProgressChangedEvent">
<summary>
EventHandler
@@ -4828,6 +4850,11 @@
</summary>
<value>X鍧愭爣</value>
</member>
+ <member name="P:Shared.CurtainSeekBarOn.IsInvertedProgress">
+ <summary>
+ 杩涘害鍊兼槸鍚﹀彇鍙�
+ </summary>
+ </member>
<member name="F:Shared.CurtainSeekBarOn.OnProgressChangedEvent">
<summary>
EventHandler
diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index c10be06..c1567e0 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -211,6 +211,7 @@
{
//Shared.Application.FontSize = 12;
+ Shared.Application.IsEditTextContentTypePassword = false;
Shared.Application.IsUsePingFang = true;
Window = new UIWindow(UIScreen.MainScreen.Bounds);
rootViewController = new UINavigationController(new ViewController()) { NavigationBarHidden = true };
diff --git a/HDL_ON/Common/Constant.cs b/HDL_ON/Common/Constant.cs
index df7d457..ff3f1b5 100644
--- a/HDL_ON/Common/Constant.cs
+++ b/HDL_ON/Common/Constant.cs
@@ -235,6 +235,25 @@
Prompt,
}
+ /// <summary>
+ /// BottomLine 绫诲瀷
+ /// </summary>
+ public enum BottomLineType
+ {
+ /// <summary>
+ /// 鏅��
+ /// </summary>
+ Normal = 0,
+ /// <summary>
+ /// 鑾峰彇鐒︾偣
+ /// </summary>
+ GotFocus,
+ /// <summary>
+ /// 閿欒
+ /// </summary>
+ Error,
+ }
+
#endregion
}
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 47cc846..7656e26 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -69,7 +69,7 @@
#endregion
- #region 妫�娴嬫洿鏂�
+ #region 鈻� 妫�娴嬫洿鏂癬______________________
/// <summary>
/// 妫�娴嬫洿鏂扮嚎绋�
/// </summary>
@@ -238,7 +238,7 @@
}
}
- #region 鎺ㄩ�佸鐞�
+ #region 鈻� 鎺ㄩ�佸鐞哶______________________
/// <summary>
/// 鎺ㄩ�佹秷鎭鐞�
/// </summary>
@@ -337,5 +337,35 @@
#endregion
+ #region 鈻� 甯哥敤鏂规硶_______________________
+ /// <summary>
+ /// 璁剧疆涓嬪垝绾挎寜閽姸鎬�
+ /// 缁熶竴灏佽璁剧疆鏂规硶
+ /// </summary>
+ /// <param name="button">涓嬪垝绾挎寜閽�</param>
+ /// <param name="bottomLineType">鐘舵��</param>
+ public void BottomLineShowType(Button button, BottomLineType bottomLineType)
+ {
+ switch (bottomLineType)
+ {
+ case BottomLineType.GotFocus:
+ button.BackgroundColor = CSS_Color.MainColor;
+ button.Height = Application.GetRealHeight(2);
+ break;
+ case BottomLineType.Error:
+ button.BackgroundColor = CSS_Color.AuxiliaryColor2;
+ button.Height = Application.GetRealHeight(2);
+ break;
+ case BottomLineType.Normal:
+ button.BackgroundColor = CSS_Color.DividingLineColor;
+ button.Height = Application.GetRealHeight(1);
+ break;
+ default:
+ button.BackgroundColor = CSS_Color.DividingLineColor;
+ button.Height = Application.GetRealHeight(1);
+ break;
+ }
+ }
+ #endregion
}
}
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 1cd630f..8335bf9 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -12,7 +12,7 @@
public class HttpUtil
{
- #region HttpUtil 鍏ㄥ眬甯搁噺
+ #region **********鍏ㄥ眬甯搁噺**********
///// <summary>
///// API_HTTPS
///// </summary>
@@ -36,6 +36,7 @@
#endregion
+ #region **********缃戠粶璇锋眰灏佽**********
/// <summary>
/// 鍥哄畾鍩熷悕,姝e紡鐜
/// </summary>
@@ -145,7 +146,7 @@
/// <param name="replaceToken"></param>
/// <param name="mTimeout"></param>
/// <returns></returns>
- public static ResponsePackNew RequestHttps(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10)
+ static ResponsePackNew RequestHttpsBase(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10)
{
#region HttpWebRequest
try
@@ -167,7 +168,6 @@
RestRequest request = new RestRequest(method);
request.Timeout = mTimeout * 1000;
request.AddHeader("content-type", "application/json");
- //request.AddHeader ("cache-control", "no-cache");
if (string.IsNullOrEmpty(replaceToken))
{
@@ -207,7 +207,6 @@
{
try
{
-
ResponsePackNew revertObj = new ResponsePackNew() { };
revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePackNew>(response.Content);
//*****涓�浜涘垽绌哄鐞�*****************
@@ -222,8 +221,6 @@
}
//*****涓�浜涘垽绌哄鐞�*****************
- ////缁熶竴杞垚澶у啓
- //revertObj.StateCode = revertObj.StateCode.ToUpper ();
return revertObj;
}
catch (Exception ex)
@@ -247,6 +244,69 @@
#endregion
+ }
+
+ /// <summary>
+ /// 閫氱敤 璇锋眰鏈嶅姟鍣ㄦ柟娉�
+ /// 澧炲姞token杩囨湡澶勭悊
+ /// </summary>
+ /// <param name="method"></param>
+ /// <param name="apiPath"></param>
+ /// <param name="bodyParameterJson"></param>
+ /// <param name="queryDictionary"></param>
+ /// <param name="urlSegmentDictionary"></param>
+ /// <param name="urlHead"></param>
+ /// <param name="replaceToken"></param>
+ /// <param name="mTimeout"></param>
+ /// <returns></returns>
+ public static ResponsePackNew RequestHttps(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10)
+ {
+ var responsePackNew = RequestHttpsBase(method, apiPath, bodyParameterJson, queryDictionary, urlSegmentDictionary, urlHead, replaceToken, mTimeout);
+ //*****************Token杩囨湡澶勭悊*****************
+ if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
+ {
+ //鍒锋柊Token
+ if (RefreshToken()) {
+ return RequestHttpsBase(method, apiPath, bodyParameterJson, queryDictionary, urlSegmentDictionary, urlHead, replaceToken, mTimeout);
+ }
+ else
+ {
+ return responsePackNew;
+ }
+ }
+ //*****************Token杩囨湡澶勭悊*****************
+ return responsePackNew;
+ }
+
+
+ /// <summary>
+ /// 鍒锋柊Token
+ /// </summary>
+ /// <returns></returns>
+ static bool RefreshToken()
+ {
+ try
+ {
+ var requestJson = GetSignRequestJson(new RefreshTokenObj()
+ {
+ refreshToken = UserInfo.Current.RefreshToken,
+ });
+ var revertObj = RequestHttpsBase(Method.POST, NewAPI.API_POST_Login, requestJson);
+ if (revertObj.Code == StateCode.SUCCESS)
+ {
+ var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<UserLoginRes>(revertObj.Data.ToString());
+ UserInfo.Current.LoginTokenString = revertData.headerPrefix + revertData.accessToken;
+ UserInfo.Current.RefreshToken = revertData.refreshToken;
+ UserInfo.Current.LastTime = DateTime.Now;
+ UserInfo.Current.SaveUserInfo();
+ return true;
+ }
+ return false;
+ }
+ catch
+ {
+ return false;
+ }
}
/// <summary>
@@ -275,7 +335,6 @@
////**************娴嬭瘯**************
RestClient client = new RestClient(requestFullUrl);
- //client.Timeout = mTimeout * 1000;
RestRequest request = new RestRequest(Method.POST);
request.Timeout = mTimeout * 1000;
request.AddHeader("content-type", "application/json");
@@ -454,7 +513,9 @@
}
+ #endregion
+ #region **********绛惧悕鏍¢獙**********
/// <summary>
///
/// </summary>
@@ -552,6 +613,7 @@
}
}
+ #endregion
}
/// <summary>
@@ -587,7 +649,5 @@
}
-
-
}
diff --git a/HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs b/HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs
index 224574b..d91c3d4 100644
--- a/HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs
+++ b/HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs
@@ -165,6 +165,10 @@
/// </summary>
string registerPhone;
string registerEmail;
+ /// <summary>
+ /// 鏄惁鐐瑰嚮浜嗚繑鍥烇紝鐢ㄤ簬灞忚斀EditText澶卞幓鐒︾偣妫�娴嬩簨浠�
+ /// </summary>
+ bool isHitBack;
#endregion
/// <summary>
@@ -185,7 +189,11 @@
public void ShowDialog()
{
- new TopViewDiv(this, bodyView, Language.StringByID(StringId.ForgetPassword)).LoadTopView();
+ Action backAction = () =>
+ {
+ isHitBack = true;
+ };
+ new TopViewDiv(this, bodyView, Language.StringByID(StringId.ForgetPassword)).LoadTopView(backAction);
//new PublicAssmebly().LoadTopView(this, bodyView, Language.StringByID(StringId.ForgetPassword));
#region 淇敼鏂瑰紡閫夋嫨
diff --git a/HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs b/HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs
index e04a6a4..47cfc1e 100644
--- a/HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs
@@ -32,6 +32,12 @@
{
if (registerType == 0)
return;
+
+ if (!string.IsNullOrEmpty(etAccount.Text.Trim()))
+ {
+ //璁板綍涔嬪墠鐨勯偖绠�
+ registerEmail = etAccount.Text.Trim();
+ }
etAccount.IsNumberKeyboardType = true;
etAccount.Text = registerPhone;
etPassword.Text = "";
@@ -61,7 +67,14 @@
{
if (registerType == 1)
return;
+
+ if (!string.IsNullOrEmpty(etAccount.Text.Trim()))
+ {
+ //璁板綍涔嬪墠鐨勬墜鏈哄彿
+ registerPhone = etAccount.Text.Trim();
+ }
etAccount.IsNumberKeyboardType = false;
+ etAccount.SecureTextEntry = false;//2020-12-10 瑙e喅Android鏁板瓧鍒囨崲鍥炶矾鏅�氶敭鐩樺彉鍔犲瘑闂
etAccount.Text = registerEmail;
etPassword.Text = "";
etRepeatPassword.Text = "";
@@ -120,7 +133,26 @@
btnGetVerificationCode_Mail.IsSelected = true;
}
}
+
+ LoadMothed_EnableResetButton();
};
+
+ //etVerificationCode.TextChangeEventHandler = (sender, e) => {
+
+ // if (etVerificationCode.Text.Length > 1)
+ // {
+ // LoadMothed_EnableResetButton();
+ // }
+ //};
+
+ Action<View, string> textChangeEventHandler = (view, textStr) =>
+ {
+ LoadMothed_EnableResetButton();
+ };
+ //etAccount.TextChangeEventHandler += textChangeEventHandler;
+ etPassword.TextChangeEventHandler += textChangeEventHandler;
+ etRepeatPassword.TextChangeEventHandler += textChangeEventHandler;
+ etVerificationCode.TextChangeEventHandler += textChangeEventHandler;
}
/// <summary>
@@ -133,22 +165,22 @@
{
if (etAccount.Foucs)
{
- btnAccountViewBottomLine.BackgroundColor = CSS_Color.MainColor;
- btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.GotFocus);
}
else
{
- //鏍囪鎵嬫満鍙风爜鏃犳晥
- btnAccountViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
- btnAccountViewBottomLine.Height = Application.GetRealHeight(1);
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
+ HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Normal);
+ if (etAccount.Text.Length == 0) return;//娌¤緭鍏ヤ笉妫�娴嬫彁绀�
+
//鎵嬫満鏂瑰紡-楠岃瘉鎵嬫満鍙风爜鏄惁姝g‘
if (registerType == 0)
{
btnGetVerificationCode_Phone.IsSelected = false;
if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode))
{
- btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
- btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error);
new Tip()
{
CloseTime = 1,
@@ -158,7 +190,7 @@
}
else
{
- if (btnGetVerificationCode_Phone.Text == Language.StringByID( StringId.GetVerificationCode))
+ if (btnGetVerificationCode_Phone.Text == Language.StringByID(StringId.GetVerificationCode))
{
btnGetVerificationCode_Phone.IsSelected = true;
}
@@ -171,8 +203,7 @@
//閭鏂瑰紡-楠岃瘉閭鏄惁姝g‘
if (!Utlis.CheckEmail(etAccount.Text.Trim()))
{
- btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
- btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error);
new Tip()
{
CloseTime = 1,
@@ -197,16 +228,19 @@
{
if (etPassword.Foucs)
{
- btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor;
- btnPasswordViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.GotFocus);
}
else
{
- btnPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
- btnPasswordViewBottomLine.Height = Application.GetRealHeight(1);
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
+ HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Normal);
+ if (etPassword.Text.Length == 0) return;//娌¤緭鍏ヤ笉妫�娴嬫彁绀�
+
//鏍¢獙瀵嗙爜鏄惁绗﹀悎瑕佹眰
if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13)
{
+ HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Error);
new Tip()
{
CloseTime = 1,
@@ -222,18 +256,17 @@
{
if (etRepeatPassword.Foucs)
{
- btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor;
- btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.GotFocus);
}
else
{
- btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
- btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(1);
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
+ HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.Normal);
//鏍¢獙涓ゆ杈撳叆鐨勫瘑鐮佹槸鍚︿竴鑷�
if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim())
{
- btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
- btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.Error);
new Tip()
{
CloseTime = 1,
@@ -253,13 +286,13 @@
{
if (etVerificationCode.Foucs)
{
- btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.MainColor;
- btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.GotFocus);
}
else
{
- btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
- btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(1);
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
+ HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Normal);
if (etVerificationCode.Text.Length > 4)
{
LoadMothed_EnableResetButton();
@@ -292,7 +325,8 @@
/// 妫�娴嬪綋鍓嶉厤缃煙鍚嶆槸鍚︿竴鑷达紝涓嶄竴鑷村垯鏇挎崲
/// </summary>
/// <param name="result"></param>
- void CheckAndSetUserRequestHost(ResponsePackNew result) {
+ void CheckAndSetUserRequestHost(ResponsePackNew result)
+ {
try
{
var mGlobalRegionListObj = Newtonsoft.Json.JsonConvert.DeserializeObject<GlobalRegionListRes>(result.Data.ToString());
@@ -361,8 +395,8 @@
//3.鍙戦�侀獙璇佺爜鎴愬姛锛屽紑濮嬭鏃�
Application.RunOnMainThread(() =>
{
- //鐭俊鍙戦�侀棿闅�60s
- (sender as Button).IsSelected = false;
+ //鐭俊鍙戦�侀棿闅�60s
+ (sender as Button).IsSelected = false;
etVerificationCode.Foucs = true;
});
//2.1鑾峰彇楠岃瘉鐮佸�掕鏃�
@@ -379,8 +413,8 @@
}
Application.RunOnMainThread(() =>
{
- //鍥炲鑾峰彇鐭俊鎸夐挳浜嬩欢
- (sender as Button).IsSelected = true;
+ //鍥炲鑾峰彇鐭俊鎸夐挳浜嬩欢
+ (sender as Button).IsSelected = true;
(sender as Button).TextID = StringId.GetVerificationCode;
});
})
@@ -419,6 +453,13 @@
{
if (btnReset.IsSelected)
{
+ //妫�娴嬭处鍙�
+ if (!CheckAccount()) return;
+ //妫�娴嬪瘑鐮�
+ if (!CheckPassword()) return;
+ //妫�娴嬮獙璇佺爜
+ if (!CheckVerificationCode()) return;
+
//鍒涘缓淇敼瀵嗙爜绾跨▼
var loginThread = LoadMothed_ResetThread();
waitPage = new Loading();
@@ -472,8 +513,7 @@
// 楠岃瘉鐮侀敊璇� 璀﹀憡鎻愮ず
if (resultObj.Code == StateCode.VERIFICATION_CODE_WRONG)
{
- btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
- btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Error);
}
});
// 鎻愮ず閿欒
@@ -498,6 +538,76 @@
}
/// <summary>
+ /// 妫�娴嬭处鍙�
+ /// </summary>
+ /// <returns></returns>
+ bool CheckAccount()
+ {
+ //鎵嬫満鏂瑰紡-楠岃瘉鎵嬫満鍙风爜鏄惁姝g‘
+ if (registerType == 0)
+ {
+ if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode))
+ {
+ Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectMobilNeumber));
+ }
+ else
+ {
+ return true;
+ }
+
+ }
+ else if (registerType == 1)
+ {
+ //閭鏂瑰紡-楠岃瘉閭鏄惁姝g‘
+ if (!Utlis.CheckEmail(etAccount.Text.Trim()))
+ {
+ Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectEmailAddress));
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// 妫�娴嬪瘑鐮佹槸鍚︽纭�
+ /// </summary>
+ /// <returns></returns>
+ bool CheckPassword()
+ {
+ //鏍¢獙瀵嗙爜鏄惁绗﹀悎瑕佹眰
+ if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13)
+ {
+ Utlis.ShowTip(Language.StringByID(StringId.PasswordIsUnqualified));
+ return false;
+ }
+
+ if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim())
+ {
+ Utlis.ShowTip(Language.StringByID(StringId.IncorrectRepeatPassword));
+ return false;
+ }
+ return true;
+ }
+
+ /// <summary>
+ /// 妫�娴嬮獙璇佺爜鏄惁杈撳叆
+ /// </summary>
+ /// <returns></returns>
+ bool CheckVerificationCode()
+ {
+ if (string.IsNullOrEmpty(etVerificationCode.Text))
+ {
+ Utlis.ShowTip(Language.StringByID(StringId.PlsEntryVerificationCode));
+ return false;
+ }
+ return true;
+ }
+
+ /// <summary>
/// 鏄剧ず鑷姩鑷姩鐧诲綍浜嬩欢
/// </summary>
void ShowAutoLoginDialog(string account, string password, bool isPhone)
@@ -514,7 +624,7 @@
FrameLayout contentView = new FrameLayout()
{
Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealWidth(200),
+ Y = Application.GetRealWidth(200),
Width = Application.GetRealWidth(288),
Height = Application.GetRealWidth(270),
Radius = (uint)Application.GetRealWidth(6),
diff --git a/HDL_ON/UI/UI1-Login/RegisterPage.cs b/HDL_ON/UI/UI1-Login/RegisterPage.cs
index eb9b2f2..a21adac 100644
--- a/HDL_ON/UI/UI1-Login/RegisterPage.cs
+++ b/HDL_ON/UI/UI1-Login/RegisterPage.cs
@@ -166,12 +166,12 @@
#endregion
#region 灞�閮ㄥ彉閲忓垪琛�
- /// <summary>
- /// 璐﹀彿绫诲瀷
- /// 0:鎵嬫満
- /// 1:閭
- /// </summary>
- int accountType = 0;
+ ///// <summary>
+ ///// 璐﹀彿绫诲瀷
+ ///// 0:鎵嬫満
+ ///// 1:閭
+ ///// </summary>
+ //int accountType = 0;
/// <summary>
/// 鎵嬫満鍙风爜鏄惁鏈夋晥
/// </summary>
@@ -193,7 +193,7 @@
/// 0:鎵嬫満
/// 1:閭
/// </summary>
- int registerType;
+ int registerType = 0;
/// <summary>
/// 鎵嬫満鍖哄彿
/// </summary>
@@ -205,6 +205,10 @@
string registerPhone;
string registerEmail;
+ /// <summary>
+ /// 鏄惁鐐瑰嚮浜嗚繑鍥烇紝鐢ㄤ簬灞忚斀EditText澶卞幓鐒︾偣妫�娴嬩簨浠�
+ /// </summary>
+ bool isHitBack;
#endregion
/// <summary>
@@ -244,7 +248,12 @@
public void ShowDialog()
{
- new TopViewDiv(this, bodyView, Language.StringByID(StringId.Register)).LoadTopView();
+ Action backAction = () =>
+ {
+ isHitBack = true;
+ };
+
+ new TopViewDiv(this, bodyView, Language.StringByID(StringId.Register)).LoadTopView(backAction);
//new PublicAssmebly().LoadTopView(this, bodyView, Language.StringByID(StringId.Register));
#region 娉ㄥ唽鏂瑰紡閫夋嫨
@@ -362,7 +371,7 @@
};
btnGlobalRoaming.MouseUpEventHandler += eHandler;
- if (accountType == 0)
+ if (registerType == 0)
{
accountView.AddChidren(btnGlobalRoaming);
}
@@ -406,7 +415,7 @@
Height = Application.GetMinRealAverage(20),
UnSelectedImagePath = "LoginIcon/AccountIcon.png",
};
- if (accountType == 1)
+ if (registerType == 1)
{
accountView.AddChidren(btnAccountIcon);
}
diff --git a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs
index ea23dcf..fdce73d 100644
--- a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs
@@ -24,6 +24,27 @@
LoadEvent_Server();
//var areaCodeList = pm.GetAreaCode();
}
+
+
+
+ /// <summary>
+ /// 浣胯兘淇敼娉ㄥ唽鎸夐挳
+ /// 鏈夊唴瀹规墠鏄剧ず娉ㄥ唽鎸夐挳
+ /// </summary>
+ void CheckEnableRegisterButton()
+ {
+ if (!string.IsNullOrEmpty(etAccount.Text) && !string.IsNullOrEmpty(etPassword.Text) && !string.IsNullOrEmpty(etVerificationCode.Text) && (etPassword.Text.Trim() == etRepeatPassword.Text.Trim()))
+ {
+ btnRegister.IsSelected = true;
+ }
+ else
+ {
+ btnRegister.IsSelected = false;
+ }
+
+ //Utlis.WriteLine(" btnRegister.IsSelected:" + btnRegister.IsSelected.ToString());
+ }
+
/// <summary>
/// 鍔犺浇鏂囨湰鍙樺寲浜嬩欢
/// </summary>
@@ -57,7 +78,12 @@
btnGetVerificationCode_Mail.IsSelected = true;
}
}
+ CheckEnableRegisterButton();
+ };
+ etVerificationCode.TextChangeEventHandler = (sender, e) =>
+ {
+ CheckEnableRegisterButton();
};
}
@@ -73,6 +99,13 @@
{
return;
}
+
+ if (!string.IsNullOrEmpty(etAccount.Text.Trim()))
+ {
+ //璁板綍涔嬪墠鐨勯偖绠�
+ registerEmail = etAccount.Text.Trim();
+ }
+
etAccount.IsNumberKeyboardType = true;
etAccount.Text = registerPhone;
etPassword.Text = "";
@@ -103,7 +136,13 @@
if (registerType == 1)
return;
+ if (!string.IsNullOrEmpty(etAccount.Text.Trim()))
+ {
+ //璁板綍涔嬪墠鐨勬墜鏈哄彿
+ registerPhone = etAccount.Text.Trim();
+ }
etAccount.IsNumberKeyboardType = false;
+ etAccount.SecureTextEntry = false;//2020-12-10 瑙e喅Android鏁板瓧鍒囨崲鍥炶矾鏅�氶敭鐩樺彉鍔犲瘑闂
etAccount.Text = registerEmail;
etPassword.Text = "";
etRepeatPassword.Text = "";
@@ -139,14 +178,14 @@
{
if (etAccount.Foucs)
{
- btnAccountViewBottomLine.BackgroundColor = CSS_Color.MainColor;
- btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.GotFocus);
}
else
{
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
//鏍囪鎵嬫満鍙风爜鏃犳晥
- btnAccountViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
- btnAccountViewBottomLine.Height = Application.GetRealHeight(1);
+ HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Normal);
//鎵嬫満娉ㄥ唽-楠岃瘉鎵嬫満鍙风爜鏄惁姝g‘
if (etAccount.Text.Trim().Length > 0)
{
@@ -154,8 +193,7 @@
{
if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode))
{
- btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
- btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error);
btnGetVerificationCode_Phone.IsSelected = false;
new Tip()
{
@@ -183,8 +221,7 @@
//閭娉ㄥ唽-楠岃瘉閭鏄惁姝g‘
if (!Utlis.CheckEmail(etAccount.Text.Trim()))
{
- btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
- btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error);
btnGetVerificationCode_Mail.IsSelected = false;
new Tip()
{
@@ -207,14 +244,7 @@
}
}
}
- if (accountType == 0)
- {
- registerPhone = etAccount.Text.Trim();
- }
- else
- {
- registerEmail = etAccount.Text.Trim();
- }
+
}
};
@@ -223,23 +253,19 @@
{
if (etPassword.Foucs)
{
- btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor;
- btnPasswordViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.GotFocus);
}
else
{
- if (etPassword.Text.Length == 0)
- {
- btnPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
- btnPasswordViewBottomLine.Height = Application.GetRealHeight(1);
- return;
- }
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
+ HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Normal);
+ if (etPassword.Text.Length == 0) return;//娌¤緭鍏ヤ笉妫�娴嬫彁绀�
+
//闇�瑕佽緭鍏�6浣嶄互涓婄殑瀵嗙爜
if (etPassword.Text.Length < 6 || etPassword.Text.Length > 13)
{
- btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
- btnPasswordViewBottomLine.Height = Application.GetRealHeight(2);
-
+ HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Error);
new Tip()
{
CloseTime = 1,
@@ -247,11 +273,7 @@
Text = Language.StringByID(StringId.PlsRegisterPassword)
}.Show(bodyView);
}
- else
- {
- btnPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
- btnPasswordViewBottomLine.Height = Application.GetRealHeight(1);
- }
+
}
};
@@ -260,20 +282,19 @@
{
if (etRepeatPassword.Foucs)
{
- btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor;
- btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.GotFocus);
}
else
{
- btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
- btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(1);
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
+ HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.Normal);
//鏍¢獙涓ゆ杈撳叆鐨勫瘑鐮佹槸鍚︿竴鑷�
if (etPassword.Text.Trim().Length > 5)
{
if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim())
{
- btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
- btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.Error);
new Tip()
{
CloseTime = 1,
@@ -299,13 +320,13 @@
{
if (etVerificationCode.Foucs)
{
- btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.MainColor;
- btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.GotFocus);
}
else
{
- btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
- btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(1);
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
+ HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Normal);
if (etVerificationCode.Text.Length > 1)
{
//璐﹀彿鏈夋晥銆佸瘑鐮佹湁鏁堛�侀獙璇佺爜杈撳叆浜嗭紝鎵嶈兘鐐瑰嚮娉ㄥ唽
@@ -316,6 +337,7 @@
}
}
};
+
}
/// <summary>
@@ -329,6 +351,7 @@
{
etPassword.Text = etPassword.Text.Remove(15);
}
+ CheckEnableRegisterButton();
};
etRepeatPassword.TextChangeEventHandler = (sender, e) =>
@@ -337,6 +360,7 @@
{
etRepeatPassword.Text = etRepeatPassword.Text.Remove(15);
}
+ CheckEnableRegisterButton();
};
}
@@ -519,20 +543,16 @@
{
btnRegister.MouseUpEventHandler = (sender, e) =>
{
- if (etPassword.Text.Trim().Length > 13 || etPassword.Text.Trim().Length < 6)
- {
- new Tip()
- {
- CloseTime = 1,
- Direction = AMPopTipDirection.None,
- Text = Language.StringByID(StringId.PlsRegisterPassword)
- }.Show(bodyView);
- return;
- }
if (btnRegister.IsSelected)
{
//鍒ゆ柇鏄惁閫夋嫨浜嗘湇鍔″櫒锛岄�夋嫨浜嗘墠鑳藉彂閫侀獙璇佺爜
if (CheckIfSelectServer() == false) return;
+ //妫�娴嬭处鍙�
+ if (!CheckAccount()) return;
+ //妫�娴嬪瘑鐮�
+ if (!CheckPassword()) return;
+ //妫�娴嬮獙璇佺爜
+ if (!CheckVerificationCode()) return;
waitPage = new Loading();
new PublicAssmebly().LoadPage_WaitPage(LoadMethod_RegisterThread(), bodyView, waitPage);
@@ -572,40 +592,13 @@
// 鎻愮ず閿欒
IMessageCommon.Current.ShowErrorInfoAlter(validateSmsResult.Code);
- //2020-11-13 寰呬慨鏀�
- //string erorrInfo = "";
- //switch (validateSmsResult.StateCode)
- //{
- // case "Exist":
- // erorrInfo = Language.StringByID(StringId.AccountAlreadyUse);
- // break;
- // case "PwdNoConfirm":
- // erorrInfo = Language.StringByID(StringId.IncorrectRepeatPassword);
- // break;
- // case "ValidCodeAndPhoneNoEqual":
- // erorrInfo = Language.StringByID(StringId.VerificationCodeWrong);
- // break;
- // case "NoRecord":
- // erorrInfo = Language.StringByID(StringId.PlsGetTheVerificationCode);
- // Application.RunOnMainThread(() =>
- // {
- // btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
- // btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(2);
- // });
- // break;
- // default:
- // erorrInfo = Language.StringByID(StringId.RegistrationFailedPleaseTryAgain);
- // break;
- //}
- //Application.RunOnMainThread(() =>
- //{
- // new Tip()
- // {
- // CloseTime = 1,
- // Direction = AMPopTipDirection.None,
- // Text = erorrInfo,
- // }.Show(bodyView);
- //});
+ Application.RunOnMainThread(() =>
+ {
+ if (validateSmsResult.Code == StateCode.VERIFICATION_CODE_WRONG)
+ {
+ HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Error);
+ }
+ });
}
}
catch (Exception ex)
@@ -673,13 +666,11 @@
{
if (isError)
{
- btnServerBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
- btnServerBottomLine.Height = Application.GetRealHeight(2);
+ HDLCommon.Current.BottomLineShowType(btnServerBottomLine, BottomLineType.Error);
}
else
{
- btnServerBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
- btnServerBottomLine.Height = Application.GetRealHeight(1);
+ HDLCommon.Current.BottomLineShowType(btnServerBottomLine, BottomLineType.Normal);
}
}
@@ -694,5 +685,76 @@
btnServerText.TextColor = CSS_Color.FirstLevelTitleColor;
btnServerText.Text = UserInfo.Current.GlobalRegion.regionName;
}
+
+
+ /// <summary>
+ /// 妫�娴嬭处鍙�
+ /// </summary>
+ /// <returns></returns>
+ bool CheckAccount()
+ {
+ //鎵嬫満鏂瑰紡-楠岃瘉鎵嬫満鍙风爜鏄惁姝g‘
+ if (registerType == 0)
+ {
+ if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode))
+ {
+ Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectMobilNeumber));
+ }
+ else
+ {
+ return true;
+ }
+
+ }
+ else if (registerType == 1)
+ {
+ //閭鏂瑰紡-楠岃瘉閭鏄惁姝g‘
+ if (!Utlis.CheckEmail(etAccount.Text.Trim()))
+ {
+ Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectEmailAddress));
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// 妫�娴嬪瘑鐮佹槸鍚︽纭�
+ /// </summary>
+ /// <returns></returns>
+ bool CheckPassword()
+ {
+ //鏍¢獙瀵嗙爜鏄惁绗﹀悎瑕佹眰
+ if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13)
+ {
+ Utlis.ShowTip(Language.StringByID(StringId.PasswordIsUnqualified));
+ return false;
+ }
+
+ if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim())
+ {
+ Utlis.ShowTip(Language.StringByID(StringId.IncorrectRepeatPassword));
+ return false;
+ }
+ return true;
+ }
+
+ /// <summary>
+ /// 妫�娴嬮獙璇佺爜鏄惁杈撳叆
+ /// </summary>
+ /// <returns></returns>
+ bool CheckVerificationCode()
+ {
+ if (string.IsNullOrEmpty(etVerificationCode.Text))
+ {
+ Utlis.ShowTip(Language.StringByID(StringId.PlsEntryVerificationCode));
+ return false;
+ }
+ return true;
+ }
}
}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
index 829146d..076aa4c 100644
--- a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
@@ -300,7 +300,7 @@
};
rowView.AddChidren(btnDatetime);
- var lineView = new LineView(rowView.Height);
+ var lineView = new LineView(rowView.Height - Application.GetRealHeight(1));
rowView.AddChidren(lineView);
//鍒犻櫎鎸夐挳
@@ -319,12 +319,13 @@
btnDatetime.Text = GetUnixToDateTime(pushMessageInfo.createTime);
- //EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
- //{
- //};
-
- //btnTilte.MouseUpEventHandler = eventHandler;
- //btnSubtitle.MouseUpEventHandler = eventHandler;
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+ {
+ new Alert(pushMessageInfo.messageTitle, pushMessageInfo.messageContent, Language.StringByID(StringId.Close)).Show();
+ };
+ rowView.MouseUpEventHandler = eventHandler;
+ btnTilte.MouseUpEventHandler = eventHandler;
+ btnSubtitle.MouseUpEventHandler = eventHandler;
}
/// <summary>
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs
index 35f59a2..54bad8f 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()
@@ -257,6 +269,10 @@
}
else
{
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
+ if (etPassword.Text.Length == 0) return;//娌¤緭鍏ヤ笉妫�娴嬫彁绀�
+
//鏍¢獙瀵嗙爜鏄惁绗﹀悎瑕佹眰
if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13)
{
@@ -283,6 +299,10 @@
}
else
{
+ if (isHitBack) return;//鐐瑰嚮杩斿洖鍏抽棴椤甸潰涓嶆娴嬫彁绀�
+
+ if (etRepeatPassword.Text.Length == 0) return;//娌¤緭鍏ヤ笉妫�娴嬫彁绀�
+
//鏍¢獙涓ゆ杈撳叆鐨勫瘑鐮佹槸鍚︿竴鑷�
if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim())
{
@@ -300,6 +320,13 @@
}
};
+ Action<View, string> textChangeEventHandler = (view, textStr) =>
+ {
+ LoadMothed_EnableResetButton();
+ };
+ etPassword.TextChangeEventHandler += textChangeEventHandler;
+ etRepeatPassword.TextChangeEventHandler += textChangeEventHandler;
+
}
/// <summary>
--
Gitblit v1.8.0