From ec9347acf051595077de7c4d84bbbf5e1b2493bd Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期三, 15 十一月 2023 10:42:24 +0800 Subject: [PATCH] 2023年11月15日10:41:37 --- HDL_ON/DAL/Server/HttpUtil.cs | 4 ++-- HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 42 ++++++++++++++++++++++++++++++++++-------- HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 13 ++++++++++++- 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 27ce5ef..0be5794 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -18,8 +18,8 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; + public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; const string APP_KEY = "HDL-HOME-APP-TEST"; const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs index c5fbf03..d83d143 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs @@ -1506,17 +1506,32 @@ case SPK.MusicStandard: case SPK.AvMusic: { + string on_off = GetKeyValue("on_off", dicList); string song_name = GetKeyValue("song_name", dicList); string volume = GetKeyValue("volume", dicList); - stateStr = song_name + ";" + Language.StringByID(StringId.volumeMusic) + volume; - if (stateStr.StartsWith(";")) + + if (!string.IsNullOrEmpty(on_off)) { - stateStr = stateStr.Substring(1, stateStr.Length - 1); + if (on_off == "on") + { + stateStr = Language.StringByID(StringId.onLogic); + } + else + { + stateStr = Language.StringByID(StringId.offLogic); + } } - else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic))) + + if (!string.IsNullOrEmpty(song_name)) { - stateStr = stateStr.Substring(0, stateStr.Length - 3); + stateStr += "," + song_name; } + + if (!string.IsNullOrEmpty(volume)) + { + stateStr += Language.StringByID(StringId.yinliang) + "," + volume; + } + } break; case SPK.ElectricalTvHisense: @@ -2494,13 +2509,24 @@ { foreach (var dic in dicList) { - if (dic["key"] == "song_name") + if (dic["key"] == "on_off") { - button1.Text = dic["value"]?.ToString(); + if (dic["value"] == "on") + { + button1.Text = Language.StringByID(StringId.onLogic); + } + else + { + button1.Text = Language.StringByID(StringId.offLogic); + } + } + else if (dic["key"] == "song_name") + { + button2.Text = dic["value"]?.ToString(); } else if (dic["key"] == "volume") { - button2.Text = dic["value"]?.ToString(); + button3.Text = dic["value"]?.ToString(); } } } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs index 1bdd1b3..e8b86db 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs @@ -736,8 +736,13 @@ case SPK.AvMusic: { #region 鐣岄潰 + ///寮�鍏� + LogicView.FunTypeView switchVie = new LogicView.FunTypeView(); + switchVie.btnText.TextID = StringId.switchLogic; + fLayout.AddChidren(switchVie.FLayoutView()); //鎻愮ず璇煶 LogicView.FunTypeView funTypeView = new LogicView.FunTypeView(); + funTypeView.frameLayout.Y = switchVie.frameLayout.Bottom; funTypeView.btnText.TextID = StringId.tishiyin; fLayout.AddChidren(funTypeView.FLayoutView()); ///闊抽噺 @@ -757,6 +762,12 @@ DelayView(fLayout, volView.frameLayout.Bottom); #endregion #region 鐐瑰嚮浜嬩欢 + ///寮�鍏崇偣鍑讳簨浠� + switchVie.btnClick.MouseUpEventHandler += (sender, e) => + { + + SwitchViewMethod(device, switchVie.btnState, 2); + }; ///鎻愮ず璇煶鐐瑰嚮浜嬩欢 funTypeView.btnClick.MouseUpEventHandler += (sender, e) => { @@ -820,7 +831,7 @@ if (edit) { //鏄剧ず缂栬緫涔嬪墠鐨勮澶囩姸鎬� - GetEditDeviceState(device, index, funTypeView.btnState, volView.btnState, null, null); + GetEditDeviceState(device, index, switchVie.btnState, funTypeView.btnState, volView.btnState, null); } #endregion -- Gitblit v1.8.0