From df8d4ab0ef17a7fab5dea9c47bbd9f4d4a2a40b0 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 15 三月 2021 14:55:49 +0800
Subject: [PATCH] 合并前上传一个版本

---
 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs |   32 +++++++++++++++++++++++++-------
 1 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs
index 9fec246..b2c3e3e 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs
@@ -40,6 +40,12 @@
             this.RefreshNowDeviceStatuMemory(this.device);
             //鍒锋柊鐣岄潰鐘舵��
             this.RefreshFormStatu();
+            //璇诲彇鐘舵��
+            new System.Threading.Thread(() =>
+            {
+                DriverLayer.Control.Ins.SendReadCommand(device);
+            })
+            { IsBackground = true }.Start();
         }
 
         /// <summary>
@@ -73,6 +79,8 @@
         /// </summary>
         private void InitFrameWhiteContent2()
         {
+            var paging = new ArmSensorHistroyPaging(device);
+            paging.InitFrame(FrameWhiteCentet2);
         }
 
         #endregion
@@ -108,10 +116,10 @@
         private void RefreshFormStatu()
         {
             Application.RunOnMainThread(() => {
-                var temp = device.status.Find((sta) => sta.key == FunctionAttributeKey.Status);
+                var temp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.Status);
                 if (temp != null)
                 {
-                    if (temp.value == "true")
+                    if (temp.state == "alarm")
                     {
                         btnIcon.IsSelected = true;
                         btnSuctionView.TextID = StringId.WaterLeakage;
@@ -136,11 +144,21 @@
         /// </summary>
         private void RefreshNowDeviceStatuMemory(Function i_LocalDevice)
         {
-            foreach (var data in i_LocalDevice.status)
-            {
-                //寮�鍏�
-                //if (data.key == "on_off") { this.weepRobotData.Cleaning = data.value.ToLower() == "on"; }
-            }
+            //foreach (var data in i_LocalDevice.status)
+            //{
+            //    if (data.value.ToLower() == "alarm")
+            //    {
+            //        this.btnIcon.IsSelected = true;
+            //        this.btnSuctionView.IsSelected = true;
+            //        this.btnSuctionView.TextID = StringId.WaterLeakage;
+            //    }
+            //    else
+            //    {
+            //        this.btnIcon.IsSelected = false;
+            //        this.btnSuctionView.IsSelected = false;
+            //        this.btnSuctionView.TextID = StringId.SensorNormalState;
+            //    }
+            //}
         }
 
         #endregion

--
Gitblit v1.8.0