From f7913245f890462eacb8754bbb6de12c82c3a416 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期一, 25 九月 2023 19:49:53 +0800 Subject: [PATCH] 2023年09月25日19:49:23 --- HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 50 +++++++++++++------------ HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs | 3 - HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 34 ++++++++++++++++ HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTVFunctionalAttributeConstant.cs | 6 ++ 4 files changed, 65 insertions(+), 28 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs index 98000c6..f1ec56c 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs @@ -1509,22 +1509,21 @@ break; case SPK.ElectricalTvHisense: { - string on_off = GetKeyValue("on_off", dicList); + string on = GetKeyValue("wol", dicList); + string off = GetKeyValue("on_off", dicList); string volumet = GetKeyValue("set_volume", dicList); string signal = GetKeyValue("signal", dicList); - if (!string.IsNullOrEmpty(on_off)) - { - if (on_off == "on") - { - stateStr = Language.StringByID(StringId.onLogic); - } - else - { - stateStr = Language.StringByID(StringId.offLogic); - //濡傛灉鍏充簡锛屽叾瀹冨睘鎬т笉鏄剧ず - break; - } + if (!string.IsNullOrEmpty(off)) + { + stateStr = Language.StringByID(StringId.offLogic); + //濡傛灉鍏充簡锛屽叾瀹冨睘鎬т笉鏄剧ず + break; + } + + if (!string.IsNullOrEmpty(on)) + { + stateStr = Language.StringByID(StringId.onLogic); } if (!string.IsNullOrEmpty(stateStr)) { @@ -2525,19 +2524,22 @@ { case "on_off": { - switch (value) + if (value == "off") { - case "on": - { - button1.Text = Language.StringByID(StringId.onLogic); - } - break; - case "off": - { - button1.Text = Language.StringByID(StringId.offLogic); - } - break; + button1.Text = Language.StringByID(StringId.offLogic); + } + + } + break; + case "wol": + { + if (value == "on") + { + button1.Text = Language.StringByID(StringId.onLogic); + + } + } break; diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs index a9274cb..93dd086 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs @@ -22,6 +22,10 @@ /// </summary> private Button btnDelay =null; /// <summary> + /// 褰撳墠璁惧 + /// </summary> + private Function device; + /// <summary> /// 瀹氫箟涓�涓褰曢�変腑璁惧鐘舵�佸垪琛紱 /// </summary> private List<Dictionary<string, string>> dicSateteList = new List<Dictionary<string, string>>(); @@ -32,6 +36,7 @@ public void Show(Entity.Function device, int index, bool edit) { #region 鐣岄潰甯冨眬 + this.device = device; this.BackgroundColor = CSS.CSS_Color.viewMiddle; LogicView.TopView topView = new LogicView.TopView(); this.AddChidren(topView.FLayoutView()); @@ -1091,6 +1096,7 @@ } break; } + //鐣岄潰鏄剧ず閫変腑鍊� button.TextID = id; selectedState = device.spk + "_" + value; @@ -1111,6 +1117,15 @@ if (button.Name == "colorful") { key = "colorful"; + } + + } + break; + case SPK.ElectricalTvHisense: + { + if ("on" == value) + { + key = "wol"; } } @@ -1301,6 +1316,22 @@ /// <returns></returns> private void AddDictionaryList(string key, Dictionary<string, string> dictionary) { + + if (this.device.spk == SPK.ElectricalTvHisense) + { + //鐗规畩澶勭悊 + if (key == "on_off") + { + key = "wol"; + } + else if (key == "wol") + { + key = "on_off"; + } + + } + + int indexValue = -1; for (int i = 0; i < dicSateteList.Count; i++) { @@ -1326,7 +1357,8 @@ dicSateteList.Add(dictionary); } - } + } + /// <summary> /// 娣诲姞鐩爣 /// </summary> diff --git a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTVFunctionalAttributeConstant.cs b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTVFunctionalAttributeConstant.cs index ae31775..7200e98 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTVFunctionalAttributeConstant.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTVFunctionalAttributeConstant.cs @@ -7,7 +7,11 @@ public class HisenseTVFunctionalAttributeConstant { /// <summary> - /// 寮�鍏�(value:0-鍏�/1-寮�) + /// 缃戠粶鍞ら啋(value:on) + /// </summary> + public const string wol = "wol"; + /// <summary> + /// 鍏�(value:0-鍏�/1-寮�) /// </summary> public const string on_off = "on_off"; /// <summary> diff --git a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs index 83623d5..4f2258c 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs @@ -168,8 +168,7 @@ //寮�鏈� kaijiFL.SetClickListener((fl, btnImage, btnText) => { - //Send.Current.Open("b7686438"); - ControlCommand(HisenseTVFunctionalAttributeConstant.on_off, "on"); + ControlCommand(HisenseTVFunctionalAttributeConstant.wol, "on"); }); //鍏虫満 -- Gitblit v1.8.0