From 223875b14fa1f87be66620c9903e5183f9b19c43 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 27 八月 2021 17:01:08 +0800
Subject: [PATCH] 2021-08-27 1.更新Android库,修改裁剪图片方案,支持大图裁剪

---
 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
index e10d48d..510234f 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
@@ -274,7 +274,7 @@
             int index = 0;
             foreach (var sensor in FunctionList.List.GetEnvirSensorsList())
             {
-                if(sensor.spk == SPK.SensorEnvironment)
+                if(SPK.EvironmentSensorList().Contains(sensor.spk))
                 {
                     foreach (var seTemp in sensor.attributes)
                     {
@@ -308,6 +308,9 @@
                             case "tvoc":
                                 newTemp.spk = SPK.SensorTVOC;
                                 newTemp.SetAttrState("spk", "tvoc");
+                                break;
+                            default:
+                                continue;
                                 break;
                         }
 
@@ -378,6 +381,10 @@
                         imagePath = "FunctionIcon/EnvirSensor/TempBg.png";
                         iconPath = "FunctionIcon/EnvirSensor/TempIcon.png";
                         break;
+                    case SPK.SensorHcho:
+                        imagePath = "FunctionIcon/EnvirSensor/HchoBg.png";
+                        iconPath = "FunctionIcon/EnvirSensor/HchoIcon.png";
+                        break;
                 }
                 sensorView.BackgroundImagePath = imagePath;
 
@@ -428,12 +435,13 @@
                     Width = Application.GetRealWidth(100),
                     Height = Application.GetRealWidth(32),
                     TextAlignment = TextAlignment.CenterLeft,
-                    TextColor = CSS_Color.FirstLevelTitleColor,
+                    TextColor = sensorTemp.GetLevelColorList(sensor.spk)[sensorTemp.GetCurLevel(sensor) - 1],
                     TextSize = CSS_FontSize.SubheadingFontSize,
                     TextID = levelTextList[sensorTemp.GetCurLevel(sensor) - 1],
                     Tag = "SensorLevel",
                 };
                 sensorView.AddChidren(btnLevel);
+
                 btnLevel.MouseUpEventHandler = (sender, e) =>
                 {
                     #region 
@@ -520,13 +528,16 @@
                     btnTitle.Text = Language.StringByID(StringId.Temp) + "(掳C)";
                     break;
                 case SPK.SensorTVOC:
-                    btnTitle.Text = "TVOC(PPM)";
+                    btnTitle.Text = "TVOC(mg/m3)";
                     break;
                 case SPK.SensorCO2:
                     btnTitle.Text = "CO2(PPM)";
                     break;
                 case SPK.SensorHumidity:
                     btnTitle.Text = Language.StringByID(StringId.Humidity) + "(%)";
+                    break;
+                case SPK.SensorHcho:
+                    btnTitle.Text = Language.StringByID(StringId.Formaldehyde) +"(mg/m3)";
                     break;
             }
 
@@ -762,7 +773,7 @@
                 {
                     if (bodyView != null)
                     {
-                        if (updateTemp.spk == SPK.SensorEnvironment)
+                        if (SPK.EvironmentSensorList().Contains(updateTemp.spk ))
                         {
                             foreach (var seTemp in updateTemp.attributes)
                             {

--
Gitblit v1.8.0