From 43b0d5870d528f23ecd6aeceb6cfd4325188b46f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 01 七月 2021 15:50:43 +0800 Subject: [PATCH] Revert "1" --- HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs | 31 ++++++++++++++++++------------- 1 files changed, 18 insertions(+), 13 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs index 171e369..2074184 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> @@ -328,12 +328,11 @@ rowReset.Height = Application.GetRealHeight(50); rowReset.Width = FrameWhiteCentet2.Width; rowReset.Y = rowAnion.Bottom; - FrameWhiteCentet2.AddChidren(rowReset); + //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) { @@ -342,10 +341,10 @@ } //璇风‘璁ゆ槸鍚﹀凡瀹為檯閲嶇疆婊よ姱骞舵寜{0}鐓ц鏄庝功瑕佹眰鎿嶄綔璁惧杩涜婊よ姱{0}瀵垮懡閲嶆柊璁℃椂 string msg = Language.StringByID(StringId.FilterElementResetMsg).Replace("{0}", "\r\n"); - this.ShowMassage(ShowMsgType.Confirm, msg, () => + HdlMessageLogic.Current.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