From cae4d4b5b508a666fbd0dff3c2a981fdff841bc8 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 30 三月 2023 13:10:33 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into wjc --- HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs | 84 ++++++++++++++++++++++++++++++++++------- 1 files changed, 69 insertions(+), 15 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs index 3c86be0..4ca2bdf 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs @@ -2,6 +2,7 @@ using HDL_ON.UI.CSS; using HDL_ON.Entity; using HDL_ON.DriverLayer; +using System; namespace HDL_ON.UI { @@ -290,22 +291,26 @@ { contentView.RemoveAll(); + var residenceFunctionCount = 0; + #region 浣忓畢淇℃伅鍖哄煙 - //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare && DB_ResidenceData.Instance.GatewayType == 1) - //{ - // residenceInfoView = new FrameLayout() - // { - // Gravity = Gravity.CenterHorizontal, - // Width = Application.GetRealWidth(343), - // Height = Application.GetRealHeight(213), - // BackgroundColor = CSS_Color.MainBackgroundColor, - // Radius = (uint)Application.GetRealHeight(12), - // BorderColor = 0x00FFFFFF, - // BorderWidth = 0, - // }; - // contentView.AddChidren(residenceInfoView); - //} - //else + if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare + && DB_ResidenceData.Instance.GatewayType == 1 + && DB_ResidenceData.Instance.CurrentRegion.isSupportGroupControl) + { + residenceInfoView = new FrameLayout() + { + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(343), + Height = Application.GetRealHeight(213), + BackgroundColor = CSS_Color.MainBackgroundColor, + Radius = (uint)Application.GetRealHeight(12), + BorderColor = 0x00FFFFFF, + BorderWidth = 0, + }; + contentView.AddChidren(residenceInfoView); + } + else { residenceInfoView = new FrameLayout() { @@ -388,6 +393,7 @@ if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) { + residenceFunctionCount++; #region ---浣忓畢绠$悊鍖哄煙 residenceManageView = new FrameLayout() { @@ -420,6 +426,7 @@ residenceManageView.AddChidren(btnResidenceManageText); #endregion + residenceFunctionCount++; #region ---鎴愬憳鍖哄煙 residenceMemberView = new FrameLayout() { @@ -547,6 +554,7 @@ if (DB_ResidenceData.Instance.GatewayType == 1) { + residenceFunctionCount++; #region ---娣诲姞鍔熻兘鍖哄煙 residenceAddFunctionView = new FrameLayout() { @@ -577,6 +585,52 @@ }; residenceAddFunctionView.AddChidren(btnResidenceAddFunctionText); #endregion + + if (DB_ResidenceData.Instance.CurrentRegion.isSupportGroupControl) + { + residenceFunctionCount++; + #region ---缁勫悎璋冨厜 + var faceManagementView = new FrameLayout() + { + X = Application.GetRealWidth(28 - 24), + Y = residenceManageView.Bottom, + Width = Application.GetRealWidth(64 + 48), + Height = Application.GetRealWidth(64), + }; + residenceInfoView.AddChidren(faceManagementView); + + var btnFaceManagementIcon = new Button + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(5), + Width = Application.GetMinRealAverage(30), + Height = Application.GetMinRealAverage(30), + UnSelectedImagePath = "PersonalCenter/CombinedDimmingIcon.png", + }; + faceManagementView.AddChidren(btnFaceManagementIcon); + var btnFaceManagementText = new Button() + { + Y = btnResidenceManageIcon.Bottom, + Height = Application.GetRealHeight(29), + TextID = StringId.CombinedDimming, + TextAlignment = TextAlignment.Center, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel + }; + faceManagementView.AddChidren(btnFaceManagementText); + + EventHandler<MouseEventArgs> eventHandler = (sender, e) => + { + var page = new CombinedDimmingListPage(); + MainPage.BasePageView.AddChidren(page); + page.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + faceManagementView.MouseUpEventHandler = eventHandler; + btnFaceManagementText.MouseUpEventHandler = eventHandler; + btnFaceManagementIcon.MouseUpEventHandler = eventHandler; + #endregion + } } } else -- Gitblit v1.8.0