From 43b0d5870d528f23ecd6aeceb6cfd4325188b46f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 01 七月 2021 15:50:43 +0800 Subject: [PATCH] Revert "1" --- HDL_ON/Entity/FunctionList.cs | 61 ++++++++++++++++++++++-------- 1 files changed, 44 insertions(+), 17 deletions(-) diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index bef3882..1f2fe17 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -101,6 +101,7 @@ return Functions.FindAll((obj) => spkList.Contains(obj.spk)); } + /// <summary> /// 绾㈠瀹濆垪琛� /// </summary> @@ -127,7 +128,7 @@ public List<Function> GetEnvirSensorsList() { var spkList = SPK.EnvironSpkList(); - return Functions.FindAll((obj) => spkList.Contains(obj.spk)); + return Functions.FindAll((obj) => spkList.Contains(obj.spk)); } /// <summary> /// 瀹夐槻璁惧鍒楄〃 @@ -139,9 +140,29 @@ } /// <summary> - /// 鍙瀵硅鍒楄〃 + /// 鍙瀵硅鍒楄〃,褰撲负null鎴杝ize涓�0鍒欎笉鏄剧ず鍙瀵硅icon /// </summary> - public UI.UI2.FuntionControlView.Video.VideoClouds videoIntercom; + // public UI.UI2.FuntionControlView.Video.VideoClouds videoIntercom; + public List<UI.UI2.FuntionControlView.Video.Video> videoIntercom = new List<UI.UI2.FuntionControlView.Video.Video>(); + + List<Function> _OtherBrandFunction; + /// <summary> + /// 绗笁鏂瑰搧鐗屽姛鑳� + /// </summary> + public List<Function> OtherBrandFunction + { + get + { + if(_OtherBrandFunction == null) + { + _OtherBrandFunction = new List<Function>(); + var spkList = SPK.GetAll3tySPK(); + _OtherBrandFunction = Functions.FindAll((obj) => spkList.Contains(obj.spk)); + } + return _OtherBrandFunction; + } + } + /// <summary> /// 鍦烘櫙鍒楄〃 @@ -163,6 +184,7 @@ /// <para>false:鐩存帴鏃犳潯浠舵坊鍔�</para></param> public void IniFunctionList(string filePath, bool checkRepeat = false) { + //MainPage.Log("12346890sdkxghjkl"); // todo 澧炲姞璁惧锛屽鍔犲姛鑳借繘鍔熻兘鍒楄〃 if (filePath.StartsWith("FunctionData_")) { @@ -180,23 +202,23 @@ //{ // UI.Music.A31MusicModel.A31MusicModelList.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<UI.Music.A31MusicModel>(functionDataString)); //} - if (checkRepeat == true) - { - //妫�娴嬮噸澶� - for (int i = 0; i < Functions.Count; i++) - { - if (Functions[i].deviceId == tempFunction.deviceId) - { - //鍏堢Щ闄ゆ帀鍐嶅姞 - Functions.RemoveAt(i); - Functions.Add(tempFunction); - return; - } - } + if (checkRepeat == true) + { + //妫�娴嬮噸澶� + for (int i = 0; i < Functions.Count; i++) + { + if (Functions[i].deviceId == tempFunction.deviceId) + { + //鍏堢Щ闄ゆ帀鍐嶅姞 + Functions.RemoveAt(i); + Functions.Add(tempFunction); + return; + } + } } Functions.Add(tempFunction); } - else if (filePath.StartsWith("SceneData_")) + if (filePath.StartsWith("SceneData_")) { var sceneDataBytes = FileUtlis.Files.ReadFile(filePath); var sceneDataString = System.Text.Encoding.UTF8.GetString(sceneDataBytes); @@ -271,6 +293,9 @@ return Functions; } + + + /// <summary> /// 娓呯┖璁惧鍔熻兘鍒楄〃 /// </summary> @@ -324,6 +349,7 @@ List.scenes.Remove(scene); } } + /// <summary> /// 鍒犻櫎鏈湴鍔熻兘鍙婃枃浠� /// </summary> @@ -441,6 +467,7 @@ }) { IsBackground = true }.Start(); } + #region 鍦烘櫙鐩稿叧 /// <summary> /// 娣诲姞鍦烘櫙 -- Gitblit v1.8.0