From f23ad1b3f9f6193f35f72104d690b21dc67d5c1f Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 06 七月 2020 12:35:25 +0800
Subject: [PATCH] 去掉了访问外网的异步
---
ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs | 52 ++++++++++++++++++++++++++++++++--------------------
1 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs
index 9e3a6c2..367fc18 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs
@@ -13,6 +13,10 @@
#region 鈻� 鍙橀噺澹版槑___________________________
/// <summary>
+ /// 娣诲姞鑱旂郴鏂瑰紡鐨勪簨浠�
+ /// </summary>
+ public Action AddPhoneEvent = null;
+ /// <summary>
/// 淇℃伅鎻愮ず鎺т欢
/// </summary>
private NormalViewControl btnErrorMsg = null;
@@ -44,6 +48,10 @@
{
Contacts.ContactAction = (phoneName, phoneNum) =>
{
+ if (string.IsNullOrEmpty(phoneName) == true)
+ {
+ return;
+ }
//鎵嬫満鍙锋娴�
if (this.CheckPhoneNumber("86", phoneNum, phoneName) == false)
{
@@ -57,6 +65,13 @@
//鍒濆鍖栦腑閮ㄤ俊鎭�
this.InitMiddleFrame();
+
+ //閲嶅啓搴曞眰杩斿洖鎸夐敭浜嬩欢
+ this.BackButtonClickEvent = (sender) =>
+ {
+ this.AddPhoneEvent = null;
+ this.CloseForm();
+ };
}
/// <summary>
@@ -80,15 +95,16 @@
btnArea.TextAlignment = TextAlignment.Center;
btnArea.TextColor = UserCenterColor.Current.TextGrayColor1;
frameBack.AddChidren(btnArea);
- btnArea.ButtonClickEvent += (sender, e) =>
- {
- var form = new AreaCodeSelectForm();
- form.AddForm();
- form.FinishSelectEvent += (code) =>
- {
- btnArea.Text = "+" + code;
- };
- };
+ //鐩墠鍙拡瀵�+86
+ //btnArea.ButtonClickEvent += (sender, e) =>
+ //{
+ // var form = new AreaCodeSelectForm();
+ // form.AddForm();
+ // form.FinishSelectEvent += (code) =>
+ // {
+ // btnArea.Text = "+" + code;
+ // };
+ //};
//鐢佃瘽杈撳叆妗�
var txtPhone = new TextInputControl(Application.GetRealWidth(634), btnArea.Height, false);
txtPhone.X = btnArea.Right + Application.GetRealWidth(35);
@@ -119,7 +135,7 @@
var txtNote = new TextInputControl(Application.GetRealWidth(740), txtPhone.Height, false);
txtNote.X = ControlCommonResourse.XXLeft;
txtNote.Y = btnLine.Bottom + Application.GetRealHeight(60);
- txtNote.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInpuBackup);
+ txtNote.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPlesaeInputNoteInformation);
frameBack.AddChidren(txtNote);
//鍙栨秷鍥炬爣
var btnCancel2 = new MostRightIconControl(69, 69);
@@ -181,6 +197,10 @@
return;
}
this.CloseForm();
+
+ //璋冪敤鍥炶皟鍑芥暟
+ this.AddPhoneEvent?.Invoke();
+ this.AddPhoneEvent = null;
}
#endregion
@@ -204,8 +224,8 @@
}
if (strNote == string.Empty)
{
- //璇疯緭鍏ュ娉ㄥ悕绉�
- btnErrorMsg.Text = Language.StringByID(R.MyInternationalizationString.uPleaseInpuBackup);
+ //璇疯緭鍏ュ娉ㄥ唴瀹�
+ btnErrorMsg.Text = Language.StringByID(R.MyInternationalizationString.uPlesaeInputNoteInformation);
return false;
}
@@ -232,13 +252,5 @@
}
#endregion
-
-
-
-
-
-
-
-
}
}
--
Gitblit v1.8.0