From a1b0ab7044100daaa7e0f1da2d2ca45e38098963 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 29 三月 2021 09:13:25 +0800
Subject: [PATCH] 2021-3-29-2
---
HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs
index 171e369..d0199bb 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)
{
@@ -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