From 8b317182c94145de9b7e8ca5a22c14b2d99bb66b Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 23 六月 2021 16:27:35 +0800
Subject: [PATCH] 2021-6-23-2
---
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