From d4973876384be55df64de45db8a511d1e0330872 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 23 六月 2021 17:06:20 +0800 Subject: [PATCH] 房间小图列表 --- 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