From 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 21 七月 2020 09:46:53 +0800
Subject: [PATCH] 请合并最新多功能面板代码
---
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs | 148 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 148 insertions(+), 0 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs
new file mode 100755
index 0000000..9a3861b
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs
@@ -0,0 +1,148 @@
+锘縰sing System;
+using Shared.Common;
+using ZigBee.Device;
+namespace Shared.Phone.UserCenter.DoorLock
+{
+ public class MasterManagementPage : DoorLockCommonLayout
+ {
+ /// <summary>
+ /// 鏋勯�犲嚱鏁�
+ /// </summary>
+ /// <param name="doorLock"></param>
+ public MasterManagementPage(ZigBee.Device.DoorLock doorLock, Shared.Phone.UserCenter.MemberInfoRes accountObj)
+ {
+ this.doorLock = doorLock;
+ this.accountObj = accountObj;
+ BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor;
+ }
+
+ #region 鍙橀噺鐢虫槑
+ /// <summary>
+ /// 褰撳墠闂ㄩ攣
+ /// </summary>
+ ZigBee.Device.DoorLock doorLock;
+ /// <summary>
+ /// 褰撳墠璐︽埛
+ /// </summary>
+ Shared.Phone.UserCenter.MemberInfoRes accountObj;
+ #endregion
+
+ /// <summary>
+ /// UI鏄剧ず
+ /// </summary>
+ public void Show()
+ {
+ string accountTitle = "";
+ if (accountObj.UserName != null)
+ {
+ accountTitle = accountObj.UserName;
+ }
+ else
+ {
+ accountTitle = accountObj.Account;
+ }
+ this.TopFrameLayout(this, accountTitle);
+
+ EventHandler<MouseEventArgs> eHandlerBack = (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+ this.btnBack.MouseUpEventHandler += eHandlerBack;
+ this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
+ this.MidFrameLayout(this);
+ MidFrameLayoutContent();
+ }
+
+ /// <summary>
+ /// 涓儴甯冨眬
+ /// </summary>
+ public void MidFrameLayoutContent()
+ {
+ 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(127 + 23),
+ BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
+ };
+ bodyView.AddChidren(RowView);
+
+ var btnMemberName = new Button()
+ {
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(58),
+ Width = Application.GetRealWidth(743),
+ Height = Application.GetRealHeight(58),
+ TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = 14,
+ };
+ RowView.AddChidren(btnMemberName);
+
+ var btnRight = new Button()
+ {
+ X = Application.GetRealWidth(58 + 899),
+ Y = Application.GetRealHeight(58),
+ Height = Application.GetRealHeight(58),
+ Width = Application.GetRealWidth(58),
+ UnSelectedImagePath = "Item/RightNext.png",
+ SelectedImagePath = "Item/Down.png",
+ };
+ RowView.AddChidren(btnRight);
+
+ var line2 = new Button()
+ {
+ Y = RowView.Height - 1,
+ X = Application.GetRealWidth(58),
+ Width = Application.GetRealWidth(965),
+ Height = 1,
+ BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
+ };
+ RowView.AddChidren(line2);
+
+ int currentIndex = i;
+ if (i == 0)
+ {
+ btnMemberName.Text = Language.StringByID(R.MyInternationalizationString.LockMethod);
+ }
+ else
+ {
+ btnMemberName.Text = Language.StringByID(R.MyInternationalizationString.LinkageEvent);
+ line2.Visible = false;
+ }
+
+ EventHandler<MouseEventArgs> eHandler = (sender, e) =>
+ {
+ if (currentIndex == 0)
+ {
+ var unLockMethod = new Shared.Phone.UserCenter.DoorLock.UnLockMethod(doorLock, accountObj);
+ Shared.Phone.UserView.HomePage.Instance.AddChidren(unLockMethod);
+ Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+ unLockMethod.Show();
+ }
+ else
+ {
+ ///璁板綍褰撳墠鐢ㄦ埛淇℃伅H06C
+ ///wjc
+ Shared.Phone.Device.Logic.SkipView.SkipAddLogic(1, doorLock, accountObj);
+
+ }
+ };
+ btnRight.MouseUpEventHandler += eHandler;
+ RowView.MouseUpEventHandler += eHandler;
+ btnMemberName.MouseUpEventHandler += eHandler;
+ }
+ }
+ }
+}
\ No newline at end of file
--
Gitblit v1.8.0