From ba275a7b58e56c61820ffccc86571447b2997e52 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期四, 05 八月 2021 16:18:00 +0800 Subject: [PATCH] 2021-08-05 1.更新 --- HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs | 33 +++++++++++++++++++++++++++------ 1 files changed, 27 insertions(+), 6 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs index dbf88dd..7012fba 100644 --- a/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs +++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs @@ -51,6 +51,10 @@ case SPK.ClothesHanger: vv = ShowFunction.Electric; break; + case SPK.AirFreshJinmao: + case SPK.AirFreshStandard: + vv = ShowFunction.FreshAir; + break; } UpdataFunctionOnCount(vv, function.spk); UpdataCloseAllButton(function); @@ -117,6 +121,9 @@ break; case ShowFunction.Electric: btnText = FunctionList.List.GetElectricals().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count.ToString(); + break; + case ShowFunction.FreshAir: + btnText = FunctionList.List.GetAirFreshList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count.ToString(); break; } if (btn.Tag.ToString() == functionCategory + "_onCount") @@ -324,8 +331,12 @@ { try { - //鍏ㄥ紑鍏ㄥ叧 - //if (DB_ResidenceData.Instance.GatewayType == 0 && !Control.Ins.IsRemote) + //浼戠湢鏃堕棿(ms) + int sleepTime = 100; + if(DB_ResidenceData.Instance.GatewayType == 0) + { + sleepTime = 200; + } if (Control.Ins.GatewayOnline_Local) { switch (functionCategory) @@ -337,7 +348,7 @@ Dictionary<string, string> d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); Control.Ins.SendWriteCommand(f, d); - System.Threading.Thread.Sleep(100); + System.Threading.Thread.Sleep(sleepTime); } break; case ShowFunction.FloorHeating: @@ -347,7 +358,7 @@ Dictionary<string, string> d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); Control.Ins.SendWriteCommand(f, d); - System.Threading.Thread.Sleep(100); + System.Threading.Thread.Sleep(sleepTime); } break; case ShowFunction.Light: @@ -357,7 +368,7 @@ Dictionary<string, string> d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); Control.Ins.SendWriteCommand(f, d); - System.Threading.Thread.Sleep(100); + System.Threading.Thread.Sleep(sleepTime); } break; case ShowFunction.Electric: @@ -367,7 +378,17 @@ Dictionary<string, string> d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); Control.Ins.SendWriteCommand(f, d); - System.Threading.Thread.Sleep(100); + System.Threading.Thread.Sleep(sleepTime); + } + break; + case ShowFunction.FreshAir: + foreach (var f in FunctionList.List.GetAirFreshList()) + { + f.trait_on_off.curValue = onoff; + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); + Control.Ins.SendWriteCommand(f, d); + System.Threading.Thread.Sleep(sleepTime); } break; } -- Gitblit v1.8.0