From 79133766997cb86b2e463671b50137588ded6588 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 08 三月 2021 10:07:55 +0800
Subject: [PATCH] Merge branch 'temp-wxr' into WJC

---
 HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs |   72 ++++++++++++++++++------------------
 1 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs
index 6eb2862..f5028ec 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs
@@ -336,26 +336,26 @@
             dialogBody.AddChidren(menuContr);
 
             //鑷姩娓呮壂
-            var iconPath = this.weepRobotData.Mode == "random" ? "FunctionIcon/Electrical/WeepRobot/AutoModeSelect.png" : "FunctionIcon/Electrical/WeepRobot/AutoMode.png";
-            menuContr.AddRowMenu(Language.StringByID(StringId.AutoClean), iconPath, this.weepRobotData.Mode == "random", () =>
-            {
-                frameBack.Close();
-                //鍙戦�佹ā寮忓懡浠�
-                this.SendComand("mode", "random");
-            });
-
-            //瀹氱偣娓呮壂
-            iconPath = this.weepRobotData.Mode == "smart" ? "FunctionIcon/Electrical/WeepRobot/FixedPointModeSelect.png" : "FunctionIcon/Electrical/WeepRobot/FixedPointMode.png";
-            menuContr.AddRowMenu(Language.StringByID(StringId.FixedPointClean), iconPath, this.weepRobotData.Mode == "smart", () =>
+            var iconPath = this.weepRobotData.Mode == "smart" ? "FunctionIcon/Electrical/WeepRobot/AutoModeSelect.png" : "FunctionIcon/Electrical/WeepRobot/AutoMode.png";
+            menuContr.AddRowMenu(Language.StringByID(StringId.AutoClean), iconPath, this.weepRobotData.Mode == "smart", () =>
             {
                 frameBack.Close();
                 //鍙戦�佹ā寮忓懡浠�
                 this.SendComand("mode", "smart");
             });
 
-            //鍖哄煙娓呮壂
+            //闅忔満娓呮壂
+            iconPath = this.weepRobotData.Mode == "random" ? "FunctionIcon/Electrical/WeepRobot/FixedPointModeSelect.png" : "FunctionIcon/Electrical/WeepRobot/FixedPointMode.png";
+            menuContr.AddRowMenu(Language.StringByID(StringId.RandomClean), iconPath, this.weepRobotData.Mode == "random", () =>
+            {
+                frameBack.Close();
+                //鍙戦�佹ā寮忓懡浠�
+                this.SendComand("mode", "random");
+            });
+
+            //铻烘棆娓呮壂
             iconPath = this.weepRobotData.Mode == "spiral" ? "FunctionIcon/Electrical/WeepRobot/AreaModeSelect.png" : "FunctionIcon/Electrical/WeepRobot/AreaMode.png";
-            menuContr.AddRowMenu(Language.StringByID(StringId.AreaClean), iconPath, this.weepRobotData.Mode == "spiral", () =>
+            menuContr.AddRowMenu(Language.StringByID(StringId.SpiralClean), iconPath, this.weepRobotData.Mode == "spiral", () =>
             {
                 frameBack.Close();
                 //鍙戦�佹ā寮忓懡浠�
@@ -522,10 +522,10 @@
             }
             else if (this.weepRobotData.Mode == "smart")
             {
-                //瀹氱偣娓呮壂
+                //闅忔満娓呮壂
                 this.btnModeIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/FixedPointMode.png";
                 this.btnModeIcon.SelectedImagePath = "FunctionIcon/Electrical/WeepRobot/FixedPointModeSelect.png";
-                this.btnModeView.TextID = StringId.FixedPointClean;
+                this.btnModeView.TextID = StringId.RandomClean;
             }
             else if (this.weepRobotData.Mode == "wall_follow")
             {
@@ -536,10 +536,10 @@
             }
             else if (this.weepRobotData.Mode == "spiral")
             {
-                //鍖哄煙娓呮壂
+                //铻烘棆娓呮壂
                 this.btnModeIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/AreaMode.png";
                 this.btnModeIcon.SelectedImagePath = "FunctionIcon/Electrical/WeepRobot/AreaModeSelect.png";
-                this.btnModeView.TextID = StringId.AreaClean;
+                this.btnModeView.TextID = StringId.SpiralClean;
             }
             else
             {
@@ -561,42 +561,42 @@
         /// </summary>
         private void RefreshNowDeviceStatuMemory(Function i_LocalDevice)
         {
-            for (int i = 0; i < i_LocalDevice.status.Count; i++)
+            for (int i = 0; i < i_LocalDevice.attributes.Count; i++)
             {
-                var data = i_LocalDevice.status[i];
+                var data = i_LocalDevice.attributes[i];
                 //寮�鍏�
-                if (data.key == "on_off") { this.weepRobotData.Cleaning = data.value.ToLower() == "on"; }
+                if (data.key == "on_off") { this.weepRobotData.Cleaning = data.state.ToLower() == "on"; }
                 //瀵绘壘鏈哄櫒
-                else if (data.key == "seek") { this.weepRobotData.SearchRobot = data.value.ToLower() == "true"; }
+                else if (data.key == "seek") { this.weepRobotData.SearchRobot = data.state.ToLower() == "true"; }
                 //杈瑰埛閲嶇疆
-                else if (data.key == "reset_edge_brush") { this.weepRobotData.ResetEdgeBrush = data.value.ToLower() == "true"; }
+                else if (data.key == "reset_edge_brush") { this.weepRobotData.ResetEdgeBrush = data.state.ToLower() == "true"; }
                 //婊氬埛閲嶇疆
-                else if (data.key == "reset_roll_brush") { this.weepRobotData.ResetRollBrush = data.value.ToLower() == "true"; }
+                else if (data.key == "reset_roll_brush") { this.weepRobotData.ResetRollBrush = data.state.ToLower() == "true"; }
                 //婊ょ綉閲嶇疆
-                else if (data.key == "reset_filter") { this.weepRobotData.ResetFilter = data.value.ToLower() == "true"; }
+                else if (data.key == "reset_filter") { this.weepRobotData.ResetFilter = data.state.ToLower() == "true"; }
                 //鍚稿姏閫夋嫨
-                else if (data.key == "suction") { this.weepRobotData.Suction = data.value; }
+                else if (data.key == "suction") { this.weepRobotData.Suction = data.state; }
                 //宸ヤ綔妯″紡
-                else if (data.key == "mode") { this.weepRobotData.Mode = data.value; }
+                else if (data.key == "mode") { this.weepRobotData.Mode = data.state; }
                 //娓呮壂鏂瑰悜	
-                else if (data.key == "direction_control") { this.weepRobotData.DirectionControl = data.value; }
+                else if (data.key == "direction_control") { this.weepRobotData.DirectionControl = data.state; }
                 //澹伴煶寮�鍏�
-                else if (data.key == "voice_switch") { this.weepRobotData.VoiceSwitch = data.value.ToLower() == "true"; }
+                else if (data.key == "voice_switch") { this.weepRobotData.VoiceSwitch = data.state.ToLower() == "true"; }
                 //娓呮壂闈㈢Н
                 else if (data.key == "clean_area")
                 {
-                    var value = data.value;
+                    var value = data.state;
                     if (value != string.Empty)
                     {
                         this.weepRobotData.CleanArea = Convert.ToInt32(value);
                     }
                 }
                 //娓呮壂璁板綍	
-                else if (data.key == "clean_record") { this.weepRobotData.CleanRecord = data.value; }
+                else if (data.key == "clean_record") { this.weepRobotData.CleanRecord = data.state; }
                 //杈瑰埛瀵垮懡
                 else if (data.key == "edge_brush")
                 {
-                    var value = data.value;
+                    var value = data.state;
                     if (value != string.Empty)
                     {
                         this.weepRobotData.EdgeBrush = Convert.ToInt32(value);
@@ -605,7 +605,7 @@
                 //婊氬埛瀵垮懡
                 else if (data.key == "roll_brush")
                 {
-                    var value = data.value;
+                    var value = data.state;
                     if (value != string.Empty)
                     {
                         this.weepRobotData.RollBrush = Convert.ToInt32(value);
@@ -614,7 +614,7 @@
                 //婊ょ綉瀵垮懡
                 else if (data.key == "filter")
                 {
-                    var value = data.value;
+                    var value = data.state;
                     if (value != string.Empty)
                     {
                         this.weepRobotData.Filter = Convert.ToInt32(value);
@@ -623,7 +623,7 @@
                 //娓呮壂鏃堕棿
                 else if (data.key == "clean_time")
                 {
-                    var value = data.value;
+                    var value = data.state;
                     if (value != string.Empty)
                     {
                         this.weepRobotData.CleanTime = Convert.ToInt32(value);
@@ -632,7 +632,7 @@
                 //鍓╀綑鐢甸噺	
                 else if (data.key == "electricity_left")
                 {
-                    var value = data.value;
+                    var value = data.state;
                     if (value != string.Empty)
                     {
                         this.weepRobotData.ElectricityLeft = Convert.ToInt32(value);
@@ -675,7 +675,7 @@
             /// </summary>
             public string Suction = string.Empty;
             /// <summary>
-            /// 宸ヤ綔妯″紡(random:鑷姩娓呮壂 smart:瀹氱偣娓呮壂 wall_follow:娌垮娓呮壂 spiral:鍖哄煙娓呮壂 chargego:鍏呯數)
+            /// 宸ヤ綔妯″紡(smart:鑷姩娓呮壂 random:闅忔満娓呮壂 wall_follow:娌垮娓呮壂 spiral:铻烘棆娓呮壂 chargego:鍏呯數)
             /// </summary>
             public string Mode = string.Empty;
             /// <summary>

--
Gitblit v1.8.0