From 5215a463afd281f62ecd67b2ae87d37404174287 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期一, 28 八月 2023 15:41:59 +0800 Subject: [PATCH] 2023年08月28日15:41:39 --- HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 50 ++++++++++++++++++++++---------------------------- 1 files changed, 22 insertions(+), 28 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs index faaa9d6..89a1e85 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using HDL_ON.Entity; using HDL_ON.UI.CSS; +using System.Linq; namespace HDL_ON.UI.UI2.Intelligence.Automation { @@ -59,7 +60,7 @@ //缇ゆ帶 case SPK.GroupControl: int height = Application.GetRealHeight(50); - int attributesNameId=0; + int attributesNameId = 0; int count = 0; foreach (var attr in (device as GroupControl).attributes) { @@ -136,7 +137,7 @@ } //璁惧寤舵椂iewv - DelayView(fLayout, height* count); + DelayView(fLayout, height * count); break; //鎻掑骇(鏈塙SB) case SPK.PanelSocket: @@ -211,8 +212,8 @@ break; //鐏厜寮�鍏� 浜害 case SPK.LightDimming: - //case SPK.LightRGB: - //case SPK.LightRGBW: + //case SPK.LightRGB: + //case SPK.LightRGBW: { #region 鐣岄潰 ///寮�鍏� @@ -736,7 +737,7 @@ ///闊抽噺 LogicView.FunTypeView volView = new LogicView.FunTypeView(); volView.frameLayout.Y = funTypeView.frameLayout.Bottom; - volView.btnText.TextID = StringId.volumeMusic; + volView.btnText.TextID = StringId.volumeMusic; fLayout.AddChidren(volView.FLayoutView()); //if (SPK.AvMusic == device.spk) @@ -744,7 +745,7 @@ // //涓嶆敮鎸佺壒娈婅闊� // volView.frameLayout.Y = Application.GetRealHeight(0); //} - + ///璁惧寤舵椂iewv DelayView(fLayout, volView.frameLayout.Bottom); @@ -763,11 +764,11 @@ { //HDL_ON.DriverLayer.Control.Ins.GetMusicDirectory(device); //var palyListName = Music.SendMethod.mMethod.GetListName(device); - var palyList= Music.SendMethod.Current.GetSingleSongList(device, "hdl_special",""); - List<string> songNameList = new List<string>(); + var palyList = Music.SendMethod.Current.GetSingleSongList(device, "hdl_special", ""); + List<string> songNameList = new List<string>(); for (int i = 0; i < palyList.songs.Count; i++) { - var song = palyList.songs[i]; + var song = palyList.songs[i]; songNameList.Add(song.name); } Application.RunOnMainThread(() => @@ -776,7 +777,7 @@ PublicInterface publicInterface = new PublicInterface(); publicInterface.FrameOrVv(this, songNameList, new List<string> { funTypeView.btnState.Text }, palyList.group, (index2) => { - var songSelecetd = palyList.songs[index2]; + var songSelecetd = palyList.songs[index2]; //鐣岄潰鏄剧ず閫変腑鍊� funTypeView.btnState.Text = songSelecetd.name; //鏁版嵁灏佽 @@ -788,7 +789,7 @@ AddDictionary("url", songSelecetd.url); } - },false); + }, false); }); } @@ -802,12 +803,12 @@ selectedState = device.spk + "_volume"; new LogicView.TipPopView { }.InputBox(StringId.volumeMusic, volView.btnState.Text, (value) => { - + //鐣岄潰鏄剧ず閫変腑鍊� - volView.btnState.Text =value; + volView.btnState.Text = value; //鏁版嵁灏佽 AddDictionary("volume", value);//闊抽噺 - },0,100); + }, 0, 100); }; if (edit) @@ -824,7 +825,7 @@ { #region 鐣岄潰 ///寮�鍏� - LogicView.FunTypeView switchView = new LogicView.FunTypeView(); + LogicView.FunTypeView switchView = new LogicView.FunTypeView(); switchView.btnText.TextID = StringId.switchLogic; fLayout.AddChidren(switchView.FLayoutView()); ///闊抽噺 @@ -834,7 +835,7 @@ fLayout.AddChidren(volView.FLayoutView()); ///淇″彿婧� - LogicView.FunTypeView sourceView = new LogicView.FunTypeView(); + LogicView.FunTypeView sourceView = new LogicView.FunTypeView(); sourceView.frameLayout.Y = volView.frameLayout.Bottom; sourceView.btnText.TextID = StringId.xinhaoyuan; fLayout.AddChidren(sourceView.FLayoutView()); @@ -871,23 +872,16 @@ ///涔嬪墠鐨勭姸鎬佹枃鏈� string currText = sourceView.btnState.Text; //璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�; - string key = "signal"; + string key = "signal"; selectedState = device.spk + "_" + key; PublicInterface pif = new PublicInterface(); - var sourceList = new List<string>(); - sourceList.Add("HDML 1"); - sourceList.Add("HDML 2"); - sourceList.Add("HDML 3"); - sourceList.Add("HDML 4"); - sourceList.Add("Live TV"); - sourceList.Add("PS"); - sourceList.Add("AV"); - pif.SingleSelectionShow(this, sourceList, Language.StringByID(StringId.xinhaoyuan), currText - , (valueStr) => + var dic = pif.GetHisenseSignalSourceDic(); + pif.SingleSelectionShow(this, dic.Keys.ToList(), Language.StringByID(StringId.xinhaoyuan), currText + , (valueStr) => { //鐣岄潰鏄剧ず閫変腑鍊� sourceView.btnState.Text = valueStr; - string value = valueStr.Replace(" ", "_"); + string value = pif.GetValue(dic, valueStr); //鏁版嵁灏佽 AddDictionary(key, value); -- Gitblit v1.8.0