From 9c4967cd8843ac7ed65ee64195bcf69c592c4a20 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 07 六月 2023 15:57:36 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into Dev-Wxr-1.8.1 --- HDL_ON/Entity/Function/Function.cs | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 47 insertions(+), 2 deletions(-) diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 171de78..8db999e 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -780,6 +780,31 @@ } } + string us = ""; + switch (attr.key) + { + case FunctionAttributeKey.SetTemp: + case FunctionAttributeKey.RoomTemp: + us = "掳C"; + var tempType = attributes.Find((obj) => obj.key == FunctionAttributeKey.TempType); + if (tempType != null) + { + us = tempType.curValue.ToString(); + } + break; + case FunctionAttributeKey.Percent: + case FunctionAttributeKey.Brightness: + us = "%"; + break; + case FunctionAttributeKey.CCT: + us = "K"; + break; + case FunctionAttributeKey.Angle: + us = "掳"; + break; + } + + switch (attr.key) { case FunctionAttributeKey.OnOff: @@ -834,11 +859,15 @@ { vv = 26; } - sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString(), max = attr.max, min = attr.min }); + sFunc.status.Add(new SceneFunctionStatus() { + UintString = us, + key = attr.key, value = Convert.ToInt32(vv).ToString(), max = attr.max, min = attr.min }) ; } else { - sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString(), max = attr.max, min = attr.min }); + sFunc.status.Add(new SceneFunctionStatus() { + UintString = us, + key = attr.key, value = attr.curValue.ToString(), max = attr.max, min = attr.min }); } break; @@ -1066,6 +1095,22 @@ /// </summary> public const string Brightness = "brightness"; /// <summary> + /// 鐐僵寮�鍏� + /// </summary> + public const string Colorful = "colorful"; + /// <summary> + /// 鐐僵寮�鍚鑹� + /// </summary> + public const string ColorfulBegin = "colorful_begin"; + /// <summary> + /// 鐐僵杩愯鏃堕棿 + /// </summary> + public const string ColorfulEnd = "colorful_end"; + /// <summary> + /// colorful_time + /// </summary> + public const string ColorfulTime = "colorful_time"; + /// <summary> /// 棰滆壊 /// </summary> public const string RGB = "rgb"; -- Gitblit v1.8.0