From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs | 106 +++++++++++++++++------------------------------------ 1 files changed, 34 insertions(+), 72 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs index 1b9661e..c501829 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs @@ -3,51 +3,37 @@ using ZigBee.Device; namespace Shared.Phone.UserCenter.DoorLock { - public class MasterManagementPage : DoorLockCommonLayout, ZigBee.Common.IStatus + public class MasterManagementPage : DoorLockCommonLayout { /// <summary> /// 鏋勯�犲嚱鏁� /// </summary> /// <param name="doorLock"></param> - public MasterManagementPage(ZigBee.Device.DoorLock doorLock, Shared.Phone.UserCenter.MemberInfoRes accountObj) + public MasterManagementPage(ZigBee.Device.DoorLock doorLock, MemberInfoRes accountObj) { this.doorLock = doorLock; this.accountObj = accountObj; BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor; } - #region 鈼� 鍙橀噺鐢虫槑__________________________ + #region 鍙橀噺鐢虫槑 + /// <summary> + /// 褰撳墠闂ㄩ攣 + /// </summary> ZigBee.Device.DoorLock doorLock; - Shared.Phone.UserCenter.MemberInfoRes accountObj; + /// <summary> + /// 褰撳墠璐︽埛 + /// </summary> + 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 = accountObj.ShowName; + this.TopFrameLayout(this, accountTitle); EventHandler<MouseEventArgs> eHandlerBack = (sender, e) => { @@ -56,23 +42,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 +88,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 +111,7 @@ else { btnMemberName.Text = Language.StringByID(R.MyInternationalizationString.LinkageEvent); + line2.Visible = false; } EventHandler<MouseEventArgs> eHandler = (sender, e) => @@ -129,50 +124,17 @@ unLockMethod.Show(); } else - { - var userDoorLockPage = new UserDoorLockPage(doorLock, accountObj); - Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); - Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; - userDoorLockPage.Show(); + { + ///璁板綍褰撳墠鐢ㄦ埛淇℃伅H06C + ///wjc + Shared.Phone.Device.Logic.SkipView.SkipAddLogic(1, doorLock, accountObj); + } }; btnRight.MouseUpEventHandler += eHandler; - RowView.MouseUpEventHandler += eHandler; + RowView.MouseUpEventHandler += eHandler; + btnMemberName.MouseUpEventHandler += eHandler; } } - - #region 鈼� 鎺ュ彛瀹炵幇__________________________ - /// <summary> - /// 澶勭悊鍙樺寲浜嬩欢 --灏嗗純鐢� 鏀圭敤DeviceInfoChange() - /// </summary> - /// <returns>The changed.</returns> - /// <param name="common">Common.</param> - public void Changed(CommonDevice common) - { - - } - /// <summary> - /// 澶勭悊鍙樺寲浜嬩欢 - /// </summary> - /// <param name="common"></param> - /// <param name="typeTag"></param> - public void DeviceInfoChange(CommonDevice common, string typeTag) - { - } - /// <summary> - /// Changeds the IL ogic status. - /// </summary> - /// <param name="logic">Logic.</param> - public void ChangedILogicStatus(ZigBee.Device.Logic logic) - { - } - /// <summary> - /// Changeds the IS cene status. - /// </summary> - /// <param name="scene">Scene.</param> - public void ChangedISceneStatus(Scene scene) - { - } - #endregion } } \ No newline at end of file -- Gitblit v1.8.0