From cb6e11c5067ecaba4d8f9907989154167c1e8943 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 09 六月 2021 17:15:05 +0800
Subject: [PATCH] Merge branch 'wxr4' into dev-tzy

---
 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs |   36 +++++-------------------------------
 1 files changed, 5 insertions(+), 31 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs
index d525651..36879be 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs
@@ -28,7 +28,7 @@
         public override void InitFrameWhiteContent()
         {
             base.ShowColltionButton = false;
-            base.SetTitleText(device.name);
+            base.SetTitleText(Language.StringByID(StringId.Sensor));
 
             //娣诲姞绗簩绱㈠紩椤�
             this.AddSecondPage();
@@ -36,9 +36,6 @@
             this.InitFrameWhiteContent1();
             //鍒濆鍖栫浜屼釜绱㈠紩椤电殑鍐呭
             this.InitFrameWhiteContent2();
-
-            //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛�
-            this.RefreshNowDeviceStatuMemory(this.device);
             //鍒锋柊鐣岄潰鐘舵��
             this.RefreshFormStatu();
             //璇诲彇鐘舵��
@@ -81,17 +78,8 @@
         /// </summary>
         private void InitFrameWhiteContent2()
         {
-            Button btnLog = new Button()
-            {
-                X = Application.GetRealWidth(16),
-                Y = Application.GetRealHeight(16),
-                Width = Application.GetRealWidth(250),
-                Height = Application.GetRealHeight(33),
-                TextAlignment = TextAlignment.CenterLeft,
-                IsBold = true,
-                TextID = StringId.Log,
-            };
-            FrameWhiteCentet2.AddChidren(btnLog);
+            var paging = new ArmSensorHistroyPaging(device);
+            paging.InitFrame(FrameWhiteCentet2);
         }
 
         #endregion
@@ -107,8 +95,6 @@
             //涓嶆槸鍚屼竴涓笢瑗�
             if (this.device.sid != i_LocalDevice.sid) { return; }
 
-            //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛�
-            this.RefreshNowDeviceStatuMemory(i_LocalDevice);
             //鍒锋柊鐣岄潰鐘舵��
             this.RefreshFormStatu();
         }
@@ -127,10 +113,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 == "true")
                     {
                         btnIcon.IsSelected = true;
                         btnSuctionView.TextID = StringId.Someone;
@@ -149,18 +135,6 @@
         #endregion
 
         #region 鈻� 涓�鑸柟娉昣__________________________
-
-        /// <summary>
-        /// 鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛�
-        /// </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"; }
-            }
-        }
 
         #endregion
     }

--
Gitblit v1.8.0