From f7d3739023f4d04a4ed2c30c13d9abf8da210da7 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 25 七月 2022 13:58:49 +0800 Subject: [PATCH] 兼容俄语 --- HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 41 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs index 342d1d5..dbba017 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs @@ -395,18 +395,57 @@ var state = false; if (function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || function.spk == SPK.CurtainTrietex || - function.spk == SPK.CurtainSwitch)//绐楀笜璁惧鏍规嵁鐧惧垎姣斿垽鏂紑鍏崇姸鎬� + function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainDream)//绐楀笜璁惧鏍规嵁鐧惧垎姣斿垽鏂紑鍏崇姸鎬� { if (function.GetAttribute(FunctionAttributeKey.Percent) != null) { state = function.GetAttrState(FunctionAttributeKey.Percent) != "0"; - }else + } + else { if (function.GetAttrState(FunctionAttributeKey.OnOff) == "stop") return; state = function.trait_on_off.curValue.ToString() == "on"; } } + else if (function.spk == SPK.SenesorMegahealth) + { + + var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus); + if (tempStatus != null) + { + switch (tempStatus.state) + {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔� + case "0": + state = false; + break; + case "1": + state = true; + break; + case "2": + if (function.extSet.labModel) + { + state = true; + } + break; + case "3": + if (function.extSet.labModel) + { + state = true; + } + break; + case "4": + state = true; + break; + case "5": + if (function.extSet.labModel) + { + state = true; + } + break; + } + } + } else { state = function.trait_on_off.curValue.ToString() == "on"; -- Gitblit v1.8.0