From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期二, 30 八月 2022 09:37:38 +0800 Subject: [PATCH] 合并了IOS的代码 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs | 115 ++++++++++++++------------------------------------------- 1 files changed, 29 insertions(+), 86 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs index bb4f462..9a3861b 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs @@ -3,7 +3,7 @@ using ZigBee.Device; namespace Shared.Phone.UserCenter.DoorLock { - public class MasterManagementPage : DoorLockCommonLayout, ZigBee.Common.IStatus + public class MasterManagementPage : DoorLockCommonLayout { /// <summary> /// 鏋勯�犲嚱鏁� @@ -16,31 +16,16 @@ 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鏄剧ず @@ -65,21 +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); @@ -101,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); @@ -124,6 +119,7 @@ else { btnMemberName.Text = Language.StringByID(R.MyInternationalizationString.LinkageEvent); + line2.Visible = false; } EventHandler<MouseEventArgs> eHandler = (sender, e) => @@ -137,69 +133,16 @@ } 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; - doorLockLogicList.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