From f1c3921b08bb22ac6f5db22d620e01d7e8e5c49f Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期一, 30 十二月 2019 13:32:33 +0800 Subject: [PATCH] 2019-12-30-1 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs | 109 ++++++++++++++++++++++++------------------------------ 1 files changed, 49 insertions(+), 60 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs old mode 100644 new mode 100755 index a1b16b0..1d333f0 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs @@ -21,37 +21,21 @@ Shared.Phone.UserCenter.MemberInfoRes accountObj; #endregion - void ReadDoorLockUserInfo() - { - System.Threading.Tasks.Task.Run(async () => - { - Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); }); - try - { - CommonDevice.DebugPrintLog($"11111111111111F"); - await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetLocaDoorLocklist(doorLock, accountObj); - CommonDevice.DebugPrintLog($"11111111111111G"); - } - catch { } - finally - { - Application.RunOnMainThread(() => - { - MidFrameLayoutContent(); - CommonDevice.DebugPrintLog($"11111111111111E"); - CommonPage.Loading.Hide(); - }); - } - }); - } - /// <summary> - /// UI鏄剧ず + /// UI鏄剧ず /// </summary> public void Show() { - CommonDevice.DebugPrintLog($"11111111111111A"); - 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) => { @@ -60,24 +44,28 @@ this.btnBack.MouseUpEventHandler += eHandlerBack; this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack; this.MidFrameLayout(this); - CommonDevice.DebugPrintLog($"11111111111111B"); - ReadDoorLockUserInfo(); - CommonDevice.DebugPrintLog($"11111111111111C"); + MidFrameLayoutContent(); } public void MidFrameLayoutContent() { - CommonDevice.DebugPrintLog($"11111111111111D"); - 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); @@ -122,6 +110,7 @@ else { btnMemberName.Text = Language.StringByID(R.MyInternationalizationString.LinkageEvent); + line2.Visible = false; } EventHandler<MouseEventArgs> eHandler = (sender, e) => @@ -134,36 +123,36 @@ unLockMethod.Show(); } else - { - - ///澶囨敞锛歐JC鐨� - ///璁板綍褰撳墠鐢ㄦ埛淇℃伅 - Phone.Device.Logic.Send.UserMemberInfoRes = accountObj; - Phone.Device.Logic.Send.CurrentDoorLock = doorLock; - if (accountObj == null) - { - ///闃叉鎶涘紓甯� - Phone.Device.Logic.Send.UserMemberInfoRes = new MemberInfoRes(); - } - if (doorLock == null) - { - ///闃叉鎶涘紓甯� - Phone.Device.Logic.Send.CurrentDoorLock = new ZigBee.Device.DoorLock(); - } - ///杩涙潵鍒锋柊涓�娆¤澶囧垪琛紱 - Common.Logic.LogicDviceList.Clear(); - if (Common.Logic.LogicDviceList.Count == 0) - { - Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray()); - } - var doorLockLogicList = new Phone.Device.Logic.DoorLockLogic.LockLogicList(); - UserView.HomePage.Instance.AddChidren(doorLockLogicList); - UserView.HomePage.Instance.PageIndex += 1; + { + ///澶囨敞锛歐JC鐨� + ///璁板綍褰撳墠鐢ㄦ埛淇℃伅 + Phone.Device.Logic.Send.UserMemberInfoRes = accountObj; + Phone.Device.Logic.Send.CurrentDoorLock = doorLock; + if (accountObj == null) + { + ///闃叉鎶涘紓甯� + Phone.Device.Logic.Send.UserMemberInfoRes = new MemberInfoRes(); + } + if (doorLock == null) + { + ///闃叉鎶涘紓甯� + Phone.Device.Logic.Send.CurrentDoorLock = new ZigBee.Device.DoorLock(); + } + ///杩涙潵鍒锋柊涓�娆¤澶囧垪琛紱 + Common.Logic.LogicDviceList.Clear(); + if (Common.Logic.LogicDviceList.Count == 0) + { + Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray()); + } + var doorLockLogicList = new Phone.Device.Logic.DoorLockLogic.LockLogicList(); + UserView.HomePage.Instance.AddChidren(doorLockLogicList); + UserView.HomePage.Instance.PageIndex += 1; doorLockLogicList.Show(); } }; btnRight.MouseUpEventHandler += eHandler; - RowView.MouseUpEventHandler += eHandler; + RowView.MouseUpEventHandler += eHandler; + btnMemberName.MouseUpEventHandler += eHandler; } } @@ -201,4 +190,4 @@ } #endregion } -} +} \ No newline at end of file -- Gitblit v1.8.0