From 1de638833e4b07b5e6c272cf5c8474b5c92ce42f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 05 九月 2023 15:21:48 +0800 Subject: [PATCH] 删除音乐权限申请 --- OnPro/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 102 ++++++++++++++------------------------------------ 1 files changed, 29 insertions(+), 73 deletions(-) diff --git a/OnPro/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/OnPro/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs index af02b12..9415f5b 100644 --- a/OnPro/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs +++ b/OnPro/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs @@ -80,11 +80,13 @@ public void LoadPage() { + //MainPage.BaseTopButton.BackgroundColor = 0xFFF7F7F7; MainPage.CurPageIndex = 1; - bodyView.BackgroundColor = CSS_Color.BackgroundColor; + bodyView.BackgroundColor = CSS_Color.TopViewColor; #region top FrameLayout topView = new FrameLayout() { + Y = Application.GetRealHeight(10), Height = Application.GetRealHeight(64), BackgroundColor = CSS_Color.TopViewColor, }; @@ -122,7 +124,7 @@ contentPageView = new PageLayout() { Y = Application.GetRealHeight(64), - Height = Application.GetRealHeight(667 - 64 - 49 + 30), + Height = Application.GetRealHeight(667 - 64 - 49 + 30 - 10), BackgroundColor = CSS_Color.MainBackgroundColor, IsShowPoint = false }; @@ -749,9 +751,9 @@ TextAlignment = TextAlignment.CenterLeft, IsMoreLines = true, }; - functionView.AddChidren(btnName); + functionView.AddChidren(btnName); - if (item != ShowFunction.FreshAir && functionCount != 0) + if (functionCount != 0) { Button btnFunctionCount = new Button() { @@ -764,6 +766,22 @@ TextAlignment = TextAlignment.CenterLeft, Text = "/" + functionCount, }; + functionView.AddChidren(btnFunctionCount); + + Button btnOpenCount = new Button() + { + X = Application.GetRealWidth(16), + Y = btnName.Bottom, + Width = Application.GetRealWidth(14 * functionCount.ToString().Length), + Height = Application.GetRealHeight(24), + TextColor = CSS_Color.MainColor, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextAlignment = TextAlignment.CenterLeft, + Text = functionOnCount.ToString(), + Tag = item + "_onCount", + BorderWidth = 0, + }; + functionView.AddChidren(btnOpenCount); } @@ -905,7 +923,13 @@ break; } - + + btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { + var skipView = new FunctionPage(); + MainPage.BasePageView.AddChidren(skipView); + skipView.LoadPage(functionPageTitleId); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; index++; } @@ -916,74 +940,6 @@ } - - void refreshInverterInfo(Button btnPowerTenerationToday, Button btnWorkingMode, Button btnCurrentPowerGeneration) - { - new System.Threading.Thread(() => - { - var http = new HttpServerRequest(); - var pack = http.GetInverterStatisticsInfo(); - if (pack != null) - { - if(pack.Data == null) - { - return; - } - var info = JsonConvert.DeserializeObject<StatisticsInfo>(pack.Data?.ToString()); - if (info == null) - { - return; - } - try - { - Application.RunOnMainThread(() => - { - btnPowerTenerationToday.Text = info.totalElectricityPvToday + "kW路h";// Language.StringByID(StringId.PowerTenerationToday).Replace("----", info.totalElectricityPvToday); - string workModeString = ""; - if (Language.CurrentLanguage == "Chinese") { - switch (info.workMode) - { - case "self_use": - workModeString = "鑷彂鑷敤"; - break; - case "peak_load_shifting": - workModeString = "鍓婂嘲濉胺"; - break; - case "battery_priority": - workModeString = "鐢垫睜浼樺厛"; - break; - } - } - else - { - switch (info.workMode) - { - case "self_use": - workModeString = "Self Consume"; - break; - case "peak_load_shifting": - workModeString = "Peak Shift"; - break; - case "battery_priority": - workModeString = "Battery Priority"; - break; - } - } - btnWorkingMode.Text = workModeString;// Language.StringByID(StringId.WorkingMode).Replace("----", workModeString); - btnCurrentPowerGeneration.Text = info.powerPvNow + "w";// Language.StringByID(StringId.CurrentPowerGeneration).Replace("----", info.powerPvNow); - //btnBatterySOC.Text = Language.StringByID(StringId.BatterySOC).Replace("--", info.batterySoc); - }); - } - catch (Exception ex) - { - MainPage.Log($"鑾峰彇瀹跺涵鍏変紡缁熻鏁版嵁寮傚父锛歿ex.Message}"); - } - } - - - }) - { IsBackground = true }.Start(); - } #region 鍒囨崲妤煎眰 /// <summary> -- Gitblit v1.8.0