From 555a2bd930cd86e220ab7146ae4655a6cafe9ca3 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 09 三月 2021 15:25:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into temp-wxr

---
 HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs |   27 ++++++++++++++++-----------
 1 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs
index 171e369..68cc16b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs
@@ -73,9 +73,9 @@
         /// </summary>
         private MostRightIconControl btnAnionSwitch = null;
         /// <summary>
-        /// 婊よ姱澶嶄綅寮�鍏虫帶浠�
+        /// 婊よ姱澶嶄綅寮�鍏虫帶浠� 2021.03.09鎺т欢鍙樻洿
         /// </summary>
-        private MostRightIconControl btnResetSwitch = null;
+        //private MostRightIconControl btnResetSwitch = null;
         /// <summary>
         /// 绌烘皵璐ㄩ噺鏁版嵁
         /// </summary>
@@ -331,9 +331,8 @@
             FrameWhiteCentet2.AddChidren(rowReset);
             rowReset.AddLeftCaption(Language.StringByID(StringId.FilterElementReset), 200);
             rowReset.AddBottomLine();
-            this.btnResetSwitch = rowReset.AddMostRightSwitchIcon();
-            btnResetSwitch.IsSelected = this.airCleanerData.FilterReset;
-            btnResetSwitch.ButtonClickEvent += (sender, e) =>
+            rowReset.AddRightArrow();
+            rowReset.ButtonClickEvent += (sender, e) =>
             {
                 if (this.btnSwitch.IsSelected == false)
                 {
@@ -345,7 +344,7 @@
                 this.ShowMassage(ShowMsgType.Confirm, msg, () =>
                 {
                     //鍙戦�佷娇鑳藉懡浠�
-                    this.SendEnableComand(btnResetSwitch, "filter_reset", btnResetSwitch.IsSelected == true ? "false" : "true");
+                    this.SendEnableComand(null, "filter_reset", "true");
                 });
             };
         }
@@ -624,12 +623,18 @@
         /// </summary>
         private void SendEnableComand(MostRightIconControl btnSwitch, string sendKey, string value)
         {
-            btnSwitch.CanClick = false;
+            if (btnSwitch != null)
+            {
+                btnSwitch.CanClick = false;
+            }
             HdlThreadLogic.Current.RunThread(() =>
             {
                 var dic = new Dictionary<string, string>();
                 dic.Add(sendKey, value);
                 Control.Ins.SendWriteCommand(this.device, dic, true);
+
+                if (btnSwitch == null) { return; }
+
                 HdlThreadLogic.Current.RunMain(() =>
                 {
                     btnSwitch.CanClick = true;
@@ -769,10 +774,10 @@
                 this.btnAnionSwitch.IsSelected = this.airCleanerData.Anion;
             }
             //婊よ姱澶嶄綅
-            if (this.btnResetSwitch.IsSelected != this.airCleanerData.FilterReset)
-            {
-                this.btnResetSwitch.IsSelected = this.airCleanerData.FilterReset;
-            }
+            //if (this.btnResetSwitch.IsSelected != this.airCleanerData.FilterReset)
+            //{
+            //    this.btnResetSwitch.IsSelected = this.airCleanerData.FilterReset;
+            //}
         }
 
         #endregion

--
Gitblit v1.8.0