From d4811b7d34b45ff6b21b97f11da128b5572ec526 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 03 三月 2021 16:03:03 +0800 Subject: [PATCH] 20210303-1 --- HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs | 68 +++++++++++++++++---------------- 1 files changed, 35 insertions(+), 33 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs index c08f7c4..eec0502 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotPage.cs @@ -170,6 +170,7 @@ btnVoiceIcon.X = btnChargeIcon.Right + Application.GetRealWidth(50); btnVoiceIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/Voice.png"; btnVoiceIcon.SelectedImagePath = "FunctionIcon/Electrical/WeepRobot/VoiceSelect.png"; + btnVoiceIcon.IsSelected = true; FrameWhiteCentet1.AddChidren(btnVoiceIcon); btnVoiceIcon.ButtonClickEvent += (sender, e) => { @@ -280,7 +281,7 @@ //鍚稿姏1妗� var iconPath = this.weepRobotData.Suction == "quiet" ? "FunctionIcon/Electrical/WeepRobot/SuctionSelect.png" : "FunctionIcon/Electrical/WeepRobot/Suction.png"; - menuContr.AddRowMenu(Language.StringByID(StringId.SuctionOneGear), iconPath, this.weepRobotData.Suction == "strong", () => + menuContr.AddRowMenu(Language.StringByID(StringId.SuctionOneGear), iconPath, this.weepRobotData.Suction == "quiet", () => { frameBack.Close(); //鍙戦�佸惛鍔涘懡浠� @@ -298,7 +299,7 @@ //鍚稿姏3妗� iconPath = this.weepRobotData.Suction == "strong" ? "FunctionIcon/Electrical/WeepRobot/SuctionSelect.png" : "FunctionIcon/Electrical/WeepRobot/Suction.png"; - menuContr.AddRowMenu(Language.StringByID(StringId.SuctionThreeGear), iconPath, this.weepRobotData.Suction == "quiet", () => + menuContr.AddRowMenu(Language.StringByID(StringId.SuctionThreeGear), iconPath, this.weepRobotData.Suction == "strong", () => { frameBack.Close(); //鍙戦�佸惛鍔涘懡浠� @@ -335,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(); //鍙戦�佹ā寮忓懡浠� @@ -476,12 +477,12 @@ //濡傛灉鏄竻鎵姸鎬� if (this.weepRobotData.Cleaning == true) { - //鍚稿姏璋冭妭涓嶅彲鐢� - this.btnSuctionIcon.IsSelected = false; - this.btnSuctionIcon.CanClick = false; + //鍚稿姏璋冭妭鍙敤 + this.btnSuctionIcon.IsSelected = true; + this.btnSuctionIcon.CanClick = true; //澹伴煶涓嶅彲鐢� - this.btnVoiceIcon.IsSelected = false; - this.btnVoiceIcon.CanClick = false; + //this.btnVoiceIcon.IsSelected = false; + //this.btnVoiceIcon.CanClick = false; //娓呮壂妯″紡涓嶅彲鐢� this.btnModeIcon.IsSelected = false; this.btnModeIcon.CanClick = false; @@ -494,12 +495,12 @@ } else { - //鍚稿姏璋冭妭鍙敤 - this.btnSuctionIcon.IsSelected = true; - this.btnSuctionIcon.CanClick = true; + //鍚稿姏璋冭妭涓嶅彲鐢� + this.btnSuctionIcon.IsSelected = false; + this.btnSuctionIcon.CanClick = false; //澹伴煶鍙敤 - this.btnVoiceIcon.IsSelected = true; - this.btnVoiceIcon.CanClick = true; + //this.btnVoiceIcon.IsSelected = true; + //this.btnVoiceIcon.CanClick = true; //娓呮壂妯″紡鍙敤 this.btnModeIcon.IsSelected = true; this.btnModeIcon.CanClick = true; @@ -521,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") { @@ -535,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 { @@ -560,8 +561,9 @@ /// </summary> private void RefreshNowDeviceStatuMemory(Function i_LocalDevice) { - foreach (var data in i_LocalDevice.status) + for (int i = 0; i < i_LocalDevice.status.Count; i++) { + var data = i_LocalDevice.status[i]; //寮�鍏� if (data.key == "on_off") { this.weepRobotData.Cleaning = data.value.ToLower() == "on"; } //瀵绘壘鏈哄櫒 @@ -651,7 +653,7 @@ /// <summary> /// 鏄惁澶勪簬娓呮壂涓� /// </summary> - public bool Cleaning = true; + public bool Cleaning = false; /// <summary> /// 瀵绘壘鏈哄櫒 /// </summary> @@ -673,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> @@ -705,7 +707,7 @@ /// </summary> public int Filter = 0; /// <summary> - /// 娓呮壂鏃堕棿(0-432000) + /// 娓呮壂鏃堕棿(0-432000) 鍗曚綅涓哄垎閽� /// </summary> public int CleanTime = 0; /// <summary> -- Gitblit v1.8.0