From f8530cf7edf28799718f2b95b3b9492ab5cc26c6 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 28 十一月 2023 09:35:25 +0800
Subject: [PATCH] 空调更新异常问题

---
 HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs |   55 +++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 47 insertions(+), 8 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
index 4a05b7c..107c8a3 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
@@ -1,10 +1,7 @@
 锘縰sing System;
 using System.Collections.Generic;
-using HDL_ON.Common;
-using HDL_ON.DriverLayer;
 using HDL_ON.Entity;
 using HDL_ON.UI.CSS;
-using Java.Util.Functions;
 using Shared;
 
 namespace HDL_ON.UI
@@ -51,7 +48,7 @@
             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",
@@ -216,10 +213,22 @@
                 Y = Application.GetRealHeight(466),
                 Width = Application.GetMinRealAverage(32),
                 Height = Application.GetMinRealAverage(32),
-                //UnSelectedImagePath = "Public/PowerClose.png",
-                UnSelectedImagePath = "Public/PowerOpen.png",
+                UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_on.png",
             };
             controlView.AddChidren(btnOn);
+            var btnOnText = new Button()
+            {
+                X = Application.GetRealWidth(100-9),
+                Y = Application.GetRealHeight(500),
+                Width = Application.GetMinRealAverage(50),
+                Height = Application.GetMinRealAverage(32),
+                TextColor = CSS_Color.TextualColor,
+                TextSize = CSS_FontSize.TextFontSize,
+                TextAlignment = TextAlignment.Center,
+                TextID = StringId.Open,
+            };
+            controlView.AddChidren(btnOnText);
+
 
             var btnOff = new Button()
             {
@@ -227,10 +236,24 @@
                 Y = Application.GetRealHeight(466),
                 Width = Application.GetMinRealAverage(32),
                 Height = Application.GetMinRealAverage(32),
-                UnSelectedImagePath = "Public/PowerClose.png",
-                //UnSelectedImagePath = "Public/PowerOpen.png",
+                UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_off.png",
             };
             controlView.AddChidren(btnOff);
+            var btnOffText = new Button()
+            {
+                X = Application.GetRealWidth(180 - 9),
+                Y = Application.GetRealHeight(500),
+                Width = Application.GetMinRealAverage(50),
+                Height = Application.GetMinRealAverage(32),
+                TextColor = CSS_Color.TextualColor,
+                TextSize = CSS_FontSize.TextFontSize,
+                TextAlignment = TextAlignment.Center,
+                TextID = StringId.Close,
+            };
+            controlView.AddChidren(btnOffText);
+
+
+
             btnOn.MouseUpEventHandler = (sender, e) =>
             {
                 var d = new Dictionary<string, string>();
@@ -239,6 +262,19 @@
             };
 
             btnOff.MouseUpEventHandler = (sender, e) =>
+            {
+                var d = new Dictionary<string, string>();
+                d.Add(FunctionAttributeKey.OnOff, "off");
+                function.Control(d);
+            };
+            btnOnText.MouseUpEventHandler = (sender, e) =>
+            {
+                var d = new Dictionary<string, string>();
+                d.Add(FunctionAttributeKey.OnOff, "on");
+                function.Control(d);
+            };
+
+            btnOffText.MouseUpEventHandler = (sender, e) =>
             {
                 var d = new Dictionary<string, string>();
                 d.Add(FunctionAttributeKey.OnOff, "off");
@@ -352,6 +388,7 @@
 
             dimmerBar.OnProgressChangedEvent = (sender, e) =>
             {
+                return;
                 if (e == 0 && lastBrightness != 0)
                 {
                     lastBrightness = 0;
@@ -446,6 +483,7 @@
 
             dimmerBar.OnProgressChangedEvent = (sender, e) =>
             {
+                return;
                 if (e == 0 && lastBrightness != 0)
                 {
                     lastBrightness = 0;
@@ -767,6 +805,7 @@
 
             dimmerBar.OnProgressChangedEvent = (sender, e) =>
             {
+                return;
                 if (e == 0 && lastBrightness != 0)
                 {
                     lastBrightness = 0;

--
Gitblit v1.8.0