From dbc23459fdf4e8b74a5f955fbb9fc631b4babc70 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 17 三月 2021 11:56:16 +0800
Subject: [PATCH] Merge branch 'temp-wxr' into WJC

---
 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs
index aac722a..0a37a2e 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs
@@ -11,18 +11,14 @@
 
         }
 
-       public static void LoadEvent_UpdataStatus(Sensor sensor)
+       public static void LoadEvent_UpdataStatus(Function updateTemp)
         {
             Application.RunOnMainThread(() =>{
                 if (bodyView != null)
                 {
                     for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++)
                     {
-                        var sensorTag = sensor.sid;
-                        if (sensor.bus != null)
-                        {
-                            sensorTag = ((int)sensor.functionType % 256) + "_" + sensor.bus.SubnetID + "_" + sensor.bus.DeviceID + "_" + sensor.bus.LoopId;
-                        }
+                        var sensorTag = updateTemp.sid;
                         var view = bodyView.sensorListView.GetChildren(i);
                         if (view.GetType() == typeof(FrameLayout))
                         {
@@ -40,20 +36,20 @@
                                         var tag = btn.Tag.ToString();
                                         if (tag == "SensorValues")
                                         {
-                                            (btn as Button).Text = sensor.values.ToString();
+                                            (btn as Button).Text = updateTemp.GetAttrState(FunctionAttributeKey.Value);
                                         }
                                         else if (tag == "SensorLevel")
                                         {
-                                            (btn as Button).TextID = sensor.levelTextList[sensor.curLevel - 1];
-                                            (btn as Button).TextColor = sensor.levelColorList[sensor.curLevel - 1];
+                                            (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1];
+                                            (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1];
                                         }
                                     }
                                 }
                                 else if (btn.GetType() == typeof(ArcSeekBar))
                                 {
-                                    (btn as ArcSeekBar).ProgressBarColor = sensor.levelColorList[sensor.curLevel - 1];
+                                    (btn as ArcSeekBar).ProgressBarColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1];
 
-                                    (btn as ArcSeekBar).Progress = (96 / sensor.levelColorList.Count) * sensor.curLevel;
+                                    (btn as ArcSeekBar).Progress = (96 / bodyView.sensorTemp.GetLevelColorList(updateTemp.spk).Count) * bodyView.sensorTemp.GetCurLevel(updateTemp);
                                 }
                             }
                         }

--
Gitblit v1.8.0