From b562a582ac3a288193e6e4f57c5eff8a344305a4 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 13:52:17 +0800
Subject: [PATCH] Update AndroidManifest.xml
---
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs | 40 ++++++++++++++++++++++++++--------------
1 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
index e92f3e5..a9e30ac 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
@@ -100,7 +100,7 @@
FrameLayout controlView = new FrameLayout()
{
Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(88),
+ Y = Application.GetRealHeight(88 + 10),
Width = Application.GetRealWidth(327),
Height = Application.GetRealHeight(526),
BackgroundImagePath = "Public/Fragmentbg.png",
@@ -285,7 +285,7 @@
var btnGradualChangeMinValuesText = new Button()
{
X = Application.GetRealWidth(35),
- Y = btnGradualChangeText.Bottom,// + Application.GetRealHeight(10),
+ Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10),
Width = Application.GetRealWidth(22),
Height = Application.GetRealHeight(21),
Text = "0s",
@@ -314,16 +314,16 @@
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()
{
X = barFadeTime.Right,
- Y = btnGradualChangeText.Bottom,// + Application.GetRealHeight(10),
+ Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10),
Width = Application.GetRealWidth(35),
Height = Application.GetRealHeight(21),
Text = "10s",
@@ -360,7 +360,7 @@
var btnEditColorful = new Button()
{
X = Application.GetRealWidth(35),
- Y = btnGradualChangeText.Bottom,// + Application.GetRealHeight(10),
+ Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10),
Width = Application.GetRealWidth(22),
Height = Application.GetRealHeight(21),
UnSelectedImagePath = "Public/Edit.png",
@@ -376,7 +376,7 @@
var barColorful = new FrameLayout()
{
X = btnEditColorful.Right + Application.GetRealWidth(15),
- Y = Application.GetRealHeight(27 + heightMore + magriHeight),
+ Y = Application.GetRealHeight(37 + heightMore + magriHeight),
Width = Application.GetRealWidth(180),
Height = Application.GetRealHeight(8),
BackgroundImagePath = "FunctionIcon/Light/ColorfulBar.png",
@@ -386,7 +386,7 @@
btnColorfulSwitch = new Button()
{
X = barColorful.Right + Application.GetRealWidth(8),
- Y = btnGradualChangeText.Bottom,// + Application.GetRealHeight(10),
+ Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10),
Width = Application.GetRealWidth(38),
Height = Application.GetRealHeight(24),
UnSelectedImagePath = "Public/Switch.png",
@@ -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