From adc150efb13a0506f45a3c344c3ee2ef2dba8e90 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 01 七月 2021 15:19:13 +0800 Subject: [PATCH] 合并嘉乐lc代码 --- HDL_ON/Entity/Function/Light.cs | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/HDL_ON/Entity/Function/Light.cs b/HDL_ON/Entity/Function/Light.cs index 63d3f63..c7546c7 100644 --- a/HDL_ON/Entity/Function/Light.cs +++ b/HDL_ON/Entity/Function/Light.cs @@ -15,6 +15,10 @@ { var color = function.GetAttrState(FunctionAttributeKey.RGB).Split(","); + if(color.Length!= 3) + { + color = new string[] {"100", "100", "100" }; + } int redColor = 0; int greenColor = 0; int blueColor = 0; @@ -31,7 +35,7 @@ /// 鑾峰彇rgb 鎺у埗瀛楃涓� /// </summary> /// <returns></returns> - public string GetRGBcolorString(Function function ) + public string GetRGBcolorString(Function function) { var color = function.GetAttrState(FunctionAttributeKey.RGB).Split(","); return color[0] + "," + color[1] + "," + color[2]; -- Gitblit v1.8.0