From 1a0a7f736c6d2e7129e7591d40bed67ec7c0f09a Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 05 二月 2021 10:47:42 +0800 Subject: [PATCH] 2021-02-05 1.编译冲突修改 --- HDL_ON/Entity/Function/Light.cs | 43 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 39 insertions(+), 4 deletions(-) diff --git a/HDL_ON/Entity/Function/Light.cs b/HDL_ON/Entity/Function/Light.cs index f9843cb..d430811 100644 --- a/HDL_ON/Entity/Function/Light.cs +++ b/HDL_ON/Entity/Function/Light.cs @@ -96,10 +96,44 @@ /// </summary> [Newtonsoft.Json.JsonIgnore] public int lastBrightness = 100; + + int hadFadeTime = 99; + /// <summary> + /// 鏄惁鎷ユ湁娓愬彉鏃堕棿 + /// </summary> + public bool HadFadeTime + { + get + { + if (hadFadeTime == 99) + { + var t = attributes.Find((obj) => obj.key == FunctionAttributeKey.FadeTime); + if (t == null) + { + hadFadeTime = 0; + return false; + } + else + { + hadFadeTime = 1; + return true; + } + } + if (hadFadeTime == 1) + { + return true; + } + else + { + return false; + } + } + } + [Newtonsoft.Json.JsonIgnore] FunctionAttributes trait_fadeTime; /// <summary> - /// 浜害鍊� + /// 娓愬彉鏃堕棿 /// </summary> [Newtonsoft.Json.JsonIgnore] public int fadeTime @@ -176,10 +210,10 @@ } if (trait_color.curValue.ToString() == "{}") trait_color.curValue = "255,255,255"; - int.TryParse(trait_color.curValue.ToString().Split(",")[0], out redColor); - int.TryParse(trait_color.curValue.ToString().Split(",")[1], out greenColor); - int.TryParse(trait_color.curValue.ToString().Split(",")[2], out blueColor); } + int.TryParse(trait_color.curValue.ToString().Split(",")[0], out redColor); + int.TryParse(trait_color.curValue.ToString().Split(",")[1], out greenColor); + int.TryParse(trait_color.curValue.ToString().Split(",")[2], out blueColor); int recolor = redColor * 256 * 256 + greenColor * 256 + blueColor; @@ -202,6 +236,7 @@ redColor = color[0]; greenColor = color[1]; blueColor = color[2]; + trait_color.curValue = redColor + "," + greenColor + "," + blueColor; } [Newtonsoft.Json.JsonIgnore] -- Gitblit v1.8.0