From 1f5d37fbca31293eff043f4a051be6f6876cea09 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 27 六月 2022 09:12:19 +0800
Subject: [PATCH] 跳动优化

---
 HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
index fc62ae0..6da0079 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
@@ -27,8 +27,11 @@
                             {
                                 bodyView.dimmerBar.Progress = Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness));
                             }
-                            bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%";
-                            bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80);
+                            if (updataTemp.GetAttrState(FunctionAttributeKey.Brightness) != "0")
+                            {
+                                bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%";
+                                bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80);
+                            }
                         }
                         else
                         {
@@ -134,6 +137,7 @@
             };
         }
 
+        bool curDimmerStatus = false;
         /// <summary>
         /// 鐏厜璋冨厜浜嬩欢
         /// </summary>
@@ -151,7 +155,8 @@
                 //    }.Show(MainPage.BaseView);
                 //    return;
                 //}
-                onDimmerBar = false;
+                //onDimmerBar = false;
+                    curDimmerStatus = false;
                 function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress);
                 System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                 d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString());

--
Gitblit v1.8.0