From 1540af2a5c0ddeb8c4389c437b71f64b3c4b45ea Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 17 十一月 2022 10:01:55 +0800 Subject: [PATCH] 组合调光RGB功能修复 --- HDL_ON/Entity/FunctionList.cs | 29 ++++++++++++++++++++++------- 1 files changed, 22 insertions(+), 7 deletions(-) diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index 398fb08..673ce1b 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -39,6 +39,14 @@ /// 鍔熻兘鍒楄〃 /// </summary> public List<Function> Functions = new List<Function>(); + /// <summary> + /// 鏈烘鑷傚垪琛� + /// </summary> + /// <returns></returns> + public List<Function> GetMechanicalArmList() + { + return Functions.FindAll((obj) => obj.spk == SPK.MechanicalArm); + } /// <summary> /// 缁垮缓绉戞妧绯荤粺 @@ -352,25 +360,33 @@ switch (brandType) { case SPK.BrandType.Hdl: - foreach (var function in Functions) + try { - if (!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(function.spk)) + foreach (var function in Functions) { - resultFunctions.Add(function); + if (!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(function.spk)) + { + resultFunctions.Add(function); + } } } + catch { } break; case SPK.BrandType.Tuya: lock (Functions) { - foreach (var function in Functions) + try { - if (SPK.Get3tySpk(SPK.BrandType.Tuya).Contains(function.spk)) + foreach (var function in Functions) { - resultFunctions.Add(function); + if (SPK.Get3tySpk(SPK.BrandType.Tuya).Contains(function.spk)) + { + resultFunctions.Add(function); + } } } + catch { } } break; } @@ -412,7 +428,6 @@ /// <summary> /// 鍒犻櫎鍦烘櫙 - /// todo /// </summary> public void DeleteScene(Scene scene,bool upSevser) { -- Gitblit v1.8.0