From 404cdc88627f942df7944af04ee05b9d527752d6 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 30 九月 2019 13:22:40 +0800
Subject: [PATCH] 合并了徐梅的按键面板绑定
---
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs | 74 ++++++++++++++++++++----------------
1 files changed, 41 insertions(+), 33 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
index 1f88c1b..a0d45c7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
@@ -5,8 +5,14 @@
/// <summary>
/// 鏍规嵁璐﹀彿鍚嶆坊鍔犳垚鍛樼殑鐢婚潰
/// </summary>
- public class AddMemberByIdForm : UserCenterCommonForm
+ public class AddMemberByIdForm : EditorCommonForm
{
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
/// <summary>
/// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
/// </summary>
@@ -24,61 +30,61 @@
/// </summary>
private void InitMiddleFrame()
{
- //璇疯緭鍏ラ渶瑕佸姞鍏ユ垚鍛樼殑ID
- var btnTitle = new ViewNormalControl(800, true);
- btnTitle.X = ControlCommonResourse.XXLeft;
- btnTitle.TextColor = UserCenterColor.Current.TextGrayColor;
- btnTitle.TextID = R.MyInternationalizationString.uPleaseInputAddMenberID;
- btnTitle.Y = Application.GetRealHeight(40);
- bodyFrameLayout.AddChidren(btnTitle);
+ //娓呯┖bodyFrame
+ this.ClearBodyFrame();
- var rowlayout = new RowLayout();
- rowlayout.Height = ControlCommonResourse.ListViewRowHeight;
- rowlayout.Y = btnTitle.Bottom;
- bodyFrameLayout.AddChidren(rowlayout);
+ var frame = new FrameLayout();
+ frame.Height = Application.GetRealHeight(248);
+ frame.BackgroundColor = UserCenterColor.Current.White;
+ bodyFrameLayout.AddChidren(frame);
- //Email/鎵嬫満鍙�
- var txtCode = new RowCenterEditorText();
- txtCode.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uEmailOrPhoneNumber);
- txtCode.PlaceholderTextColor = UserCenterColor.Current.TextTipColor;
- rowlayout.AddChidren(txtCode);
+ var rowAccount = new FrameRowControl();
+ rowAccount.UseClickStatu = false;
+ rowAccount.Y = Application.GetRealHeight(23);
+ frame.AddChidren(rowAccount);
+ //搴曠嚎
+ rowAccount.AddBottomLine();
- //鎻愮ず淇℃伅
- var txtMsg = new ViewNormalControl(800, true);
- txtMsg.X = ControlCommonResourse.XXLeft;
- txtMsg.Y = rowlayout.Bottom + Application.GetRealHeight(5);
- txtMsg.TextColor = UserCenterColor.Current.Red;
- bodyFrameLayout.AddChidren(txtMsg);
+ //璇疯緭鍏ラ渶瑕佸姞鍏ユ垚鍛樼殑ID(Email/鎵嬫満鍙�)
+ var txtCode = new TextInputControl(Application.GetRealWidth(900), rowAccount.Height, false);
+ txtCode.X = ControlCommonResourse.XXLeft;
+ txtCode.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputAddMenberID);
+ rowAccount.AddChidren(txtCode, ChidrenBindMode.NotBind);
//涓嬩竴姝�
- var btnBottom = new BottomClickButton();
+ var btnBottom = new BottomClickButton(688);
+ btnBottom.Y = Application.GetRealHeight(706);
btnBottom.TextID = R.MyInternationalizationString.uNextway;
bodyFrameLayout.AddChidren(btnBottom);
- btnBottom.MouseUpEventHandler += ((sender, e) =>
+ btnBottom.ButtonClickEvent += ((sender, e) =>
{
//鎴愬憳ID妫�娴�
- if (this.CheckAccountId(txtCode.Text.Trim(), txtMsg) == false)
+ if (this.CheckAccountId(txtCode.Text.Trim()) == false)
{
return;
}
//妫�绱㈡垚鍛樹俊鎭�
- this.SearchMemberInfo(txtCode.Text.Trim(), txtMsg);
+ this.SearchMemberInfo(txtCode.Text.Trim());
});
}
+
+ #endregion
+
+ #region 鈻� 鎼滅储ID_____________________________
/// <summary>
/// 鎼滅储鎸囧畾ID鐨勪俊鎭�
/// </summary>
/// <param name="accountId">鎴愬憳ID</param>
/// <param name="txtMsg">淇℃伅鎺т欢</param>
- private async void SearchMemberInfo(string accountId, ViewNormalControl txtMsg)
+ private async void SearchMemberInfo(string accountId)
{
//寮�鍚繘搴︽潯
this.ShowProgressBar();
var pra = new AccountInfoPra();
pra.Account = accountId;
- string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", pra);
+ string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra);
//鍏抽棴杩涘害鏉�
this.CloseProgressBar();
@@ -93,7 +99,7 @@
Application.RunOnMainThread(() =>
{
var form = new AddMemberInfoForm();
- this.AddForm(form, infoResult);
+ form.AddForm(infoResult);
});
}
@@ -101,16 +107,18 @@
/// 妫�鏌ヨ緭鍏ョ殑鎴愬憳ID
/// </summary>
/// <param name="accountId"></param>
- /// <param name="txtMsg"></param>
/// <returns></returns>
- private bool CheckAccountId(string accountId, ViewNormalControl txtMsg)
+ private bool CheckAccountId(string accountId)
{
if (accountId == string.Empty)
{
- txtMsg.TextID = R.MyInternationalizationString.uPleaseInputEmailOrPhoneNumber;
+ //璇疯緭鍏ラ渶瑕佸姞鍏ユ垚鍛樼殑ID
+ this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseInputAddMemberId));
return false;
}
return true;
}
+
+ #endregion
}
}
--
Gitblit v1.8.0