From efcffde735fa65ae34bae0bcc86313b74ed0e36c Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 20 五月 2024 13:47:38 +0800 Subject: [PATCH] 优化离线数据 --- HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs | 114 ++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 96 insertions(+), 18 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs index 2e19364..a7cd03f 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 { @@ -142,7 +143,7 @@ ///// <summary> ///// 鑾峰彇鏀寔鏂囨湰 ///// </summary> - //Button btnSupportText; + Button btnSupportText; /// <summary> /// 鍏充簬On鏂囨湰 @@ -163,8 +164,25 @@ bodyView = this; bodyView.BackgroundColor = CSS_Color.BackgroundColor; } + public void LoadView() { + //try + //{ + // if (MainPage.CurPageIndex == 3) + // { + // Application.RunOnMainThread(() => + // { + // this.RemoveFromParent(); + // return; + // }); + // } + //} + //catch (Exception ex) + //{ + // MainPage.Log($"鐣岄潰鍒囨崲寮傚父:{ex.Message}"); + //} + MainPage.CurPageIndex = 3; #region 涓汉淇℃伅 topbg = new FrameLayout() { @@ -257,6 +275,10 @@ { btnExit.Text = "閫�鍑�"; } + //else if (Language.CurrentLanguage == "russian") + //{ + // btnExit.Text = "胁褘褏芯写"; + //} else { btnExit.Text = "Exit"; @@ -286,22 +308,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.HomeGateway.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() { @@ -384,6 +410,7 @@ if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) { + residenceFunctionCount++; #region ---浣忓畢绠$悊鍖哄煙 residenceManageView = new FrameLayout() { @@ -416,6 +443,7 @@ residenceManageView.AddChidren(btnResidenceManageText); #endregion + residenceFunctionCount++; #region ---鎴愬憳鍖哄煙 residenceMemberView = new FrameLayout() { @@ -543,6 +571,7 @@ if (DB_ResidenceData.Instance.GatewayType == 1) { + residenceFunctionCount++; #region ---娣诲姞鍔熻兘鍖哄煙 residenceAddFunctionView = new FrameLayout() { @@ -573,6 +602,53 @@ }; residenceAddFunctionView.AddChidren(btnResidenceAddFunctionText); #endregion + + if (DB_ResidenceData.Instance.HomeGateway.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.GroupControl, + TextAlignment = TextAlignment.Center, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + IsMoreLines = true, + }; + 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 @@ -935,7 +1011,8 @@ // BackgroundColor = 0xFFFF0000, //}; //supportView.AddChidren(supView); - //supView.MouseUpEventHandler = (sender, e) => { + //supView.MouseUpEventHandler = (sender, e) => + //{ // Dialog dialog = new Dialog(); // var bodyView = new FrameLayout(); @@ -957,7 +1034,8 @@ // TextAlignment = TextAlignment.CenterLeft, // TextSize = CSS_FontSize.SubheadingFontSize, // }; - // btnClose.MouseUpEventHandler = (sender, e) => { + // btnClose.MouseUpEventHandler = (sender9, e0) => + // { // dialog.Close(); // }; // bodyView.AddChidren(btnClose); -- Gitblit v1.8.0