From 3291885285dfd5d4f665c20676307878dc3163bc Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 20 十二月 2019 16:28:53 +0800
Subject: [PATCH] 请合并最新代码(优化设备不支持的功能)
---
ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs | 52 ++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs
index 2a07059..2e2d466 100755
--- a/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs
@@ -241,7 +241,7 @@
/// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
private void Account_TextChange(object sender, string mouseEventArgs)
{
- errorBtn.Text = "";
+ errorBtn.Text = string.Empty;
if ((sender as EditText).Text.Trim().Length > 0)
{
@@ -261,7 +261,7 @@
/// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
private void Code_TextChange(object sender, string mouseEventArgs)
{
- errorBtn.Text = "";
+ errorBtn.Text = string.Empty;
if ((sender as EditText).Text.Trim().Length > 0)
{
resetBtn.Enable = resetBtn.IsSelected = true;
@@ -282,6 +282,11 @@
/// <param name="mouseEventArgs"></param>
private async void SendCode_MouseUpEventAsync(object sender, MouseEventArgs mouseEventArgs)
{
+ if (CheckAccount(account) == false)
+ {
+ return;
+ }
+
(sender as Button).Enable = (sender as Button).IsSelected = false;
CommonPage.Loading.Start();
try
@@ -347,6 +352,35 @@
CommonPage.Loading.Hide();
}
}
+
+
+ /// <summary>
+ /// CheckAccount
+ /// </summary>
+ /// <param name="accountStr"></param>
+ /// <returns></returns>
+ private bool CheckAccount(string accountStr)
+ {
+ errorBtn.Text = string.Empty;
+ if (phoneEmailForm.SelectedEmail.IsSelected)
+ {
+ if (AccountLogic.Instance.CheckEmail(accountStr) == false)
+ {
+ errorBtn.TextID = R.MyInternationalizationString.TheEmailError;
+ return false;
+ }
+ }
+ else
+ {
+ if (AccountLogic.Instance.CheckPhoneWithZone(accountStr, CommonPage.PhoneZoneStr) == false)
+ {
+ errorBtn.TextID = R.MyInternationalizationString.ThePhoneError;
+ return false;
+ }
+ }
+ return true;
+ }
+
#endregion
#region 鈼� 纭淇敼__________________________
@@ -358,13 +392,23 @@
/// <param name="mouseEventArgs"></param>
private async void Reset(object sender,MouseEventArgs mouseEventArgs)
{
+
+ if (CheckAccount(account) == false)
+ {
+ return;
+ }
//鍏堝垽鏂�2娆″瘑鐮佽緭鍏ユ槸鍚︿竴鑷�
if (pwdRow.PasswrodET.Text.Trim() != pwdComfireRow.PasswrodET.Text.Trim())
{
- var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.TwoPasswordInconsistency), Language.StringByID(R.MyInternationalizationString.Confrim));
- alert.Show();
+ errorBtn.TextID = R.MyInternationalizationString.TwoPasswordInconsistency;
return;
}
+ if (AccountLogic.Instance.CheckPwdLength(pwdRow.PasswrodET.Text.Trim()) == false)
+ {
+ errorBtn.TextID = R.MyInternationalizationString.ThePWDLengthError;
+ return;
+ }
+
CommonPage.Loading.Start();
try
{
--
Gitblit v1.8.0