From ea0b1e8e5f43c5fd0a7d479e25ede3b8cbea464a Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期一, 02 十二月 2024 17:17:19 +0800 Subject: [PATCH] tcp;可视对讲; --- HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs | 181 ++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 161 insertions(+), 20 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs index 21b1dd9..41bb7cb 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 { @@ -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,10 +275,6 @@ { btnExit.Text = "閫�鍑�"; } - //else if (Language.CurrentLanguage == "russian") - //{ - // btnExit.Text = "胁褘褏芯写"; - //} else { btnExit.Text = "Exit"; @@ -290,22 +304,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() { @@ -388,6 +406,7 @@ if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) { + residenceFunctionCount++; #region ---浣忓畢绠$悊鍖哄煙 residenceManageView = new FrameLayout() { @@ -420,6 +439,7 @@ residenceManageView.AddChidren(btnResidenceManageText); #endregion + residenceFunctionCount++; #region ---鎴愬憳鍖哄煙 residenceMemberView = new FrameLayout() { @@ -547,6 +567,7 @@ if (DB_ResidenceData.Instance.GatewayType == 1) { + residenceFunctionCount++; #region ---娣诲姞鍔熻兘鍖哄煙 residenceAddFunctionView = new FrameLayout() { @@ -577,6 +598,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 @@ -859,6 +927,79 @@ #endregion + #region Siri + #if __IOS__ + //if (Application.PhoneType >= 12) + { + supportViewCellCount++; + //supportView 鍔犻珮 鏄剧ず3琛� 3*44 + supportView.Height = Application.GetRealWidth(supportViewCellCount * 44); + + FrameLayout siriView = new FrameLayout() + { + Height = Application.GetRealWidth(44), + }; + supportView.AddChidren(siriView); + + //浣忓畢涓哄綋鍓嶈处鍙锋墠鏄剧ず鏅鸿兘闊崇鍏ュ彛 + Button btnSiriIcon = new Button() + { + X = Application.GetRealWidth(12), + Y = Application.GetRealWidth(10), + Width = Application.GetMinRealAverage(24), + Height = Application.GetMinRealAverage(24), + UnSelectedImagePath = "PersonalCenter/SiriIcon.png", + }; + siriView.AddChidren(btnSiriIcon); + + btnSiriText = new Button() + { + X = Application.GetRealWidth(48), + Width = Application.GetRealWidth(270), + Height = Application.GetRealWidth(44), + TextColor = CSS_Color.FirstLevelTitleColor, + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.TextFontSize + }; + if(Language.CurrentLanguage == "Chinese") + { + btnSiriText.Text = "Siri蹇嵎鏂瑰紡"; + }else + { + btnSiriText.Text = "Siri Shortcut"; + } + + siriView.AddChidren(btnSiriText); + + + btnSiriText.MouseUpEventHandler = (sender, e) => { + var ddd =new Other.SkipControl(); + ddd.SkipSiriView(); + }; + + Button btnSiriRight = new Button() + { + X = Application.GetRealWidth(315), + Y = Application.GetRealWidth(14), + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/Right.png", + }; + siriView.AddChidren(btnSiriRight); + + var btnSmartSpeakerViewLine = new Button() + { + X = Application.GetRealWidth(48), + Y = Application.GetRealWidth(43), + Height = Application.GetRealHeight(1), + Width = Application.GetRealWidth(279), + BackgroundColor = CSS_Color.DividingLineColor + }; + siriView.AddChidren(btnSmartSpeakerViewLine); + } + #endif + #endregion + #region 鑾峰彇鏀寔 //FrameLayout supView = new FrameLayout() //{ @@ -955,7 +1096,7 @@ //supView.AddChidren(btnSupportViewLine); #endregion - #region 鍏充簬On Pro + #region 鍏充簬 FrameLayout aboutView = new FrameLayout() { Height = Application.GetRealWidth(44), -- Gitblit v1.8.0