From 44aa189d9e01f8c0d19e00e44f1ef419ff2cc093 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 08 十二月 2022 22:36:38 +0800
Subject: [PATCH] 2022年12月08日22:36:36
---
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs | 39 ++++++++++++++++++++++++++++++++++-----
1 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
index ea27379..a49c750 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
@@ -274,7 +274,11 @@
int index = 0;
foreach (var sensor in FunctionList.List.GetEnvirSensorsList())
{
- if(SPK.EvironmentSensorList().Contains(sensor.spk))
+ if (sensor.spk == SPK.SensorPm10)
+ {
+ continue;
+ }
+ if(SPK.EvironmentSensorList().Contains(sensor.spk) )
{
foreach (var seTemp in sensor.attributes)
{
@@ -488,8 +492,33 @@
/// </summary>
void LoadInfo(Function sensor)
{
- var levelColorList = sensorTemp.GetLevelColorList(sensor.spk);
- var levelTextList = sensorTemp.GetLevelTextList(sensor.spk);
+ List<uint> levelColorList = new List<uint>();
+ List<int> levelTextList = new List<int>();
+ List<string> levelText = new List<string>();
+ var configs = sensor.GetAttrKeyConfigs(sensor.SpkClassification);
+
+
+ int i = 0;
+ foreach(var info in configs)
+ {
+ foreach(var config in info.configs)
+ {
+ var color = Convert.ToUInt32(config.color,16);
+ var text = config.desc;
+ levelColorList.Add(color);
+ levelText.Add(text);
+ levelTextList.Add(i++);
+ }
+ }
+ if (levelColorList.Count == 0)
+ {
+ levelColorList = sensorTemp.GetLevelColorList(sensor.spk);
+ levelTextList = sensorTemp.GetLevelTextList(sensor.spk);
+ foreach(var iii in levelTextList)
+ {
+ levelText.Add(Language.StringByID(iii));
+ }
+ }
Dialog dialog = new Dialog();
FrameLayout dialogBodyView = new FrameLayout();
@@ -582,7 +611,7 @@
IsBold = true,
TextID = StringId.ColorValue,
});
- for (int index = 0; index < levelTextList.Count; index++)
+ for (int index = 0; index < levelText.Count; index++)
{
infoView.AddChidren(new Button()
{
@@ -617,7 +646,7 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.TextFontSize,
IsBold = true,
- TextID = levelTextList[index]
+ Text = levelText[index]
});
subInfoView.AddChidren(new Button()
--
Gitblit v1.8.0