From af1cb3ecd0f4b0589e00b28f7f9edccf39e6e12b Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 10 九月 2020 16:15:11 +0800
Subject: [PATCH] 202009101

---
 HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs |   47 ++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 38 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs
index 796ced9..df8ab1c 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs
@@ -29,7 +29,11 @@
         /// <summary>
         /// 璋冨厜鎺т欢
         /// </summary>
-        WaveSeekBar dimmerBar;
+        WaveSeekBarOn dimmerBar;
+        /// <summary>
+        /// 浜害鏄剧ず鎸夐挳
+        /// </summary>
+        Button btnBrightnessText;
         /// <summary>
         /// 寮�鍏虫寜閽�
         /// </summary>
@@ -117,23 +121,47 @@
             };
             controlView.AddChidren(btnCollection);
 
-            dimmerBar = new WaveSeekBar()
+            dimmerBar = new WaveSeekBarOn()
             {
                 Gravity = Gravity.CenterHorizontal,
                 Y = Application.GetRealHeight(74 + 16),
                 Width = Application.GetRealWidth(168 - 40),
                 Height = Application.GetRealHeight(288 - 16 - 16),
-                WaveColor = light.on_off == "on" ? CSS_Color.AuxiliaryColor1 : CSS_Color.DividingLineColor,
-                WaveBorderColor = CSS_Color.PromptingColor2,
+                //WaveBorderColor = CSS_Color.PromptingColor2,
                 BorderColor = 0x00000000,
-                CornerRadius = Application.GetRealWidth(1),
+                CornerRadius = Application.GetRealWidth(40),
                 BorderWidth = 0,
-                WavePadding = Application.GetRealWidth(-5),
-                BackgroundColor = CSS_Color.BackgroundColor,
-                Radius = (uint)Application.GetRealWidth(40),
+                //WavePadding = Application.GetRealWidth(-5),
+                //BackgroundColor = CSS_Color.BackgroundColor,
+                //Radius = (uint)Application.GetRealWidth(40),
                 Progress = light.brightness,
+                //ProgressTextColor =0x00000000,
+                IsProgressTextShow = false,
             };
             controlView.AddChidren(dimmerBar);
+            if(light.trait_on_off.value.ToString() == "on")
+            {
+                dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
+            }
+            else
+            {
+                dimmerBar.SetProgressBarColors(CSS_Color.DividingLineColor, CSS_Color.DividingLineColor);
+            }
+            dimmerBar.Progress = light.brightness;
+            btnBrightnessText = new Button()
+            {
+                Gravity = Gravity.CenterHorizontal,
+                Y =( (100 - dimmerBar.Progress) * Application.GetRealHeight(288 - 16 - 16) /100)+ Application.GetRealWidth(40),
+                Width = Application.GetRealWidth(56),
+                Height = Application.GetRealWidth(46),
+                UnSelectedImagePath = "FunctionIcon/Light/BrightnessBg.png",
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
+                Text = light.brightness + "%",
+                BackgroundColor = 0xFF000FFF
+            };
+            controlView.AddChidren(btnBrightnessText);
+
 
             #region 娓愬彉鏃堕棿璋冭妭
             var btnGradualChangeText = new Button()
@@ -177,6 +205,7 @@
                 ProgressBarUnitSring = "s",
                 MaxValue = 10,
                 Progress = 0,
+                SeekBarPadding = Application.GetRealWidth(20),
             };
             controlView.AddChidren(barGradualChange);
 
@@ -202,7 +231,7 @@
                 Height = Application.GetMinRealAverage(40),
                 UnSelectedImagePath = "Public/PowerClose.png",
                 SelectedImagePath = "Public/PowerOpen.png",
-                IsSelected = light.on_off == "on",
+                IsSelected = light.trait_on_off.value.ToString() == "on",
                 //Tag = 
             };
             controlView.AddChidren(btnSwitch);

--
Gitblit v1.8.0