From bd46c57c77c276014db3192a4e2cc96e23c93202 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 21 二月 2020 13:08:47 +0800
Subject: [PATCH] 先上传个版本吧
---
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs | 77 ++++++++++++++++++++------------------
1 files changed, 41 insertions(+), 36 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs
index 311d28a..b49e762 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs
@@ -16,38 +16,32 @@
BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor;
}
- #region 鈼� 鍙橀噺鐢虫槑__________________________
+ #region 鍙橀噺鐢虫槑
+ /// <summary>
+ /// 褰撳墠闂ㄩ攣
+ /// </summary>
ZigBee.Device.DoorLock doorLock;
+ /// <summary>
+ /// 褰撳墠璐︽埛
+ /// </summary>
Shared.Phone.UserCenter.MemberInfoRes accountObj;
#endregion
-
- void ReadDoorLockUserInfo()
- {
- System.Threading.Tasks.Task.Run(async () =>
- {
- Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); });
- try
- {
- await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetLocaDoorLocklist(doorLock, accountObj);
- }
- catch { }
- finally
- {
- Application.RunOnMainThread(() =>
- {
- MidFrameLayoutContent();
- CommonPage.Loading.Hide();
- });
- }
- });
- }
/// <summary>
/// UI鏄剧ず
/// </summary>
public void Show()
{
- this.TopFrameLayout(this, accountObj.Account);
+ string accountTitle = "";
+ if (accountObj.UserName != null)
+ {
+ accountTitle = accountObj.UserName;
+ }
+ else
+ {
+ accountTitle = accountObj.Account;
+ }
+ this.TopFrameLayout(this, accountTitle);
EventHandler<MouseEventArgs> eHandlerBack = (sender, e) =>
{
@@ -56,23 +50,31 @@
this.btnBack.MouseUpEventHandler += eHandlerBack;
this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
this.MidFrameLayout(this);
-
- ReadDoorLockUserInfo();
-
+ MidFrameLayoutContent();
}
+ /// <summary>
+ /// 涓儴甯冨眬
+ /// </summary>
public void MidFrameLayoutContent()
{
- var bodyView = new VerticalScrolViewLayout()
+ var bodyView = new VerticalRefreshLayout()
{
};
this.midFrameLayout.AddChidren(bodyView);
+ bodyView.BeginHeaderRefreshingAction += async () =>
+ {
+ bodyView.BeginHeaderRefreshing();
+ await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockAllAcountUserlist(doorLock);
+ bodyView.EndHeaderRefreshing();
+ };
for (int i = 0; i < 2; i++)
{
var RowView = new FrameLayout()
{
- Height = Application.GetRealHeight(161),
+ Height = Application.GetRealHeight(127 + 23),
+ BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
};
bodyView.AddChidren(RowView);
@@ -94,7 +96,7 @@
Y = Application.GetRealHeight(58),
Height = Application.GetRealHeight(58),
Width = Application.GetRealWidth(58),
- UnSelectedImagePath = "Item/Next.png",
+ UnSelectedImagePath = "Item/RightNext.png",
SelectedImagePath = "Item/Down.png",
};
RowView.AddChidren(btnRight);
@@ -117,6 +119,7 @@
else
{
btnMemberName.Text = Language.StringByID(R.MyInternationalizationString.LinkageEvent);
+ line2.Visible = false;
}
EventHandler<MouseEventArgs> eHandler = (sender, e) =>
@@ -130,18 +133,19 @@
}
else
{
- ///璁板綍褰撳墠鐢ㄦ埛淇℃伅 --娓╁眳鍩�
- Phone.Device.Logic.DoorLockLogic.LockIfon.UserMemberInfoRes = accountObj;
- Phone.Device.Logic.DoorLockLogic.LockIfon.DoorLock = doorLock;
+ ///澶囨敞锛歐JC鐨�
+ ///璁板綍褰撳墠鐢ㄦ埛淇℃伅
+ Phone.Device.Logic.Send.UserMemberInfoRes = accountObj;
+ Phone.Device.Logic.Send.CurrentDoorLock = doorLock;
if (accountObj == null)
{
///闃叉鎶涘紓甯�
- Phone.Device.Logic.DoorLockLogic.LockIfon.UserMemberInfoRes = new MemberInfoRes();
+ Phone.Device.Logic.Send.UserMemberInfoRes = new MemberInfoRes();
}
if (doorLock == null)
{
///闃叉鎶涘紓甯�
- Phone.Device.Logic.DoorLockLogic.LockIfon.DoorLock = new ZigBee.Device.DoorLock();
+ Phone.Device.Logic.Send.CurrentDoorLock = new ZigBee.Device.DoorLock();
}
///杩涙潵鍒锋柊涓�娆¤澶囧垪琛紱
Common.Logic.LogicDviceList.Clear();
@@ -156,11 +160,12 @@
}
};
btnRight.MouseUpEventHandler += eHandler;
- RowView.MouseUpEventHandler += eHandler;
+ RowView.MouseUpEventHandler += eHandler;
+ btnMemberName.MouseUpEventHandler += eHandler;
}
}
- #region 鈼� 鎺ュ彛瀹炵幇__________________________
+ #region 鎺ュ彛瀹炵幇
/// <summary>
/// 澶勭悊鍙樺寲浜嬩欢 --灏嗗純鐢� 鏀圭敤DeviceInfoChange()
/// </summary>
--
Gitblit v1.8.0