From f222fb8ae7d265f094922f31970e1e805672ee01 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期二, 17 十月 2023 16:53:55 +0800
Subject: [PATCH] 2023年10月17日16:53:42
---
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs | 28 ++++++++++++++++++++--------
1 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
index efa0d57..4560904 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
@@ -314,11 +314,11 @@
SeekBarPadding = Application.GetRealWidth(20),
};
controlView.AddChidren(barFadeTime);
- barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
- {
- function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress);
- function.UpdataFuncitonInfo();
- };
+ //barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
+ //{
+ // function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress);
+ // function.UpdataFuncitonInfo();
+ //};
var btnGradualChangeMaxValuesText = new Button()
{
@@ -404,6 +404,16 @@
function.SetAttrState(FunctionAttributeKey.Colorful, controlColorfulState);
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.Colorful, controlColorfulState);
+ if (controlColorfulState == "on")
+ {
+ var color = function.GetAttrState(FunctionAttributeKey.ColorfulBegin).Split(",");
+ var sendColorString = color[0] + "," + color[1] + "," + color[2];
+ d.Add(FunctionAttributeKey.ColorfulBegin, sendColorString);
+ color = function.GetAttrState(FunctionAttributeKey.ColorfulEnd).Split(",");
+ sendColorString = color[0] + "," + color[1] + "," + color[2];
+ d.Add(FunctionAttributeKey.ColorfulEnd, sendColorString);
+ d.Add(FunctionAttributeKey.ColorfulTime, function.GetAttrState(FunctionAttributeKey.ColorfulTime));
+ }
Control.Ins.SendWriteCommand(function, d);
}catch(Exception ex)
{
@@ -445,11 +455,12 @@
new TopViewDiv(bodyView, Language.StringByID(StringId.Lights)).LoadTopView_FunctionTop(function, actionRefresh);
new System.Threading.Thread(() =>
{
- DriverLayer.Control.Ins.SendReadCommand(function);
+ Control.Ins.SendReadCommand(function);
})
{ IsBackground = true }.Start();
- new System.Threading.Thread(() => {
+ new System.Threading.Thread(() =>
+ {
while (true)
{
System.Threading.Thread.Sleep(1000);
@@ -463,7 +474,8 @@
}
else
{
- DriverLayer.Control.Ins.SendReadCommand(function);
+ System.Threading.Thread.Sleep(1000);
+ Control.Ins.SendReadCommand(function);
curDimmerStatus = true;
}
}
--
Gitblit v1.8.0