From f8343a2e765eefe10c8a0d6bdd6db65b0cf0321c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期六, 06 五月 2023 15:33:30 +0800
Subject: [PATCH] 灯光延时

---
 HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs |  147 ++++++++++++++++++++++--------------------------
 1 files changed, 67 insertions(+), 80 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs
index 9b0088a..43c592a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs
@@ -122,79 +122,7 @@
             int attrViewHight = Application.GetRealHeight(18 + 22);
 
 
-            //鍙湁缁х數鍣�
-            if (!hadDimming && !hadCCT && !hadRGB)
-            {
                 attrViewHight += Application.GetRealHeight(50);
-                attrView.Height = attrViewHight;
-                contentView.AddChidren(attrView);
-                attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) });
-
-                var view = new FrameLayout()
-                {
-                    Width = Application.GetRealWidth(343),
-                    Height = Application.GetRealHeight(50),
-                };
-                attrView.AddChidren(view);
-
-
-                var btnClose = new Button()
-                {
-                    X = Application.GetRealWidth(50),
-                    Gravity = Gravity.CenterVertical,
-                    Width = Application.GetRealWidth(98),
-                    Height = Application.GetRealHeight(40),
-                    TextColor = CSS_Color.TextualColor,
-                    SelectedBackgroundColor = CSS_Color.MainColor,
-                    SelectedTextColor = CSS_Color.MainBackgroundColor,
-                    BackgroundColor = CSS_Color.DividingLineColor,
-                    TextID = StringId.OFF,
-                    TextSize = CSS_FontSize.TextFontSize,
-                    Radius = (uint)Application.GetRealWidth(5),
-                    IsSelected = true,
-                    //BorderWidth = 1,
-                    //BorderColor = 0x00000000
-                };
-                view.AddChidren(btnClose);
-
-                var btnOpen = new Button()
-                {
-                    X = Application.GetRealWidth(100 + 98),
-                    Gravity = Gravity.CenterVertical,
-                    Width = Application.GetRealWidth(98),
-                    Height = Application.GetRealHeight(40),
-                    TextColor = CSS_Color.TextualColor,
-                    SelectedBackgroundColor = CSS_Color.MainColor,
-                    SelectedTextColor = CSS_Color.MainBackgroundColor,
-                    BackgroundColor = CSS_Color.DividingLineColor,
-                    TextID = StringId.On,
-                    TextSize = CSS_FontSize.TextFontSize,
-                    Radius = (uint)Application.GetRealWidth(5),
-                };
-                view.AddChidren(btnOpen);
-
-                btnClose.MouseUpEventHandler = (sender, e) =>
-                {
-                    btnClose.IsSelected = true;
-                    btnOpen.IsSelected = false;
-                    var d = new Dictionary<string, object>();
-                    d.Add(FunctionAttributeKey.OnOff, "off");
-                    group.Control(d);
-                };
-                btnOpen.MouseUpEventHandler = (sender, e) =>
-                {
-                    btnClose.IsSelected = false;
-                    btnOpen.IsSelected = true;
-
-                    var d = new Dictionary<string, object>();
-                    d.Add(FunctionAttributeKey.OnOff, "on");
-                    group.Control(d);
-                };
-
-            }
-
-            else
-            {
                 if (hadRGB)
                 {
                     attrViewHight += Application.GetRealHeight(248);
@@ -202,7 +130,7 @@
                 }
                 if (hadCCT)
                 {
-                    attrViewHight += Application.GetRealHeight(54 + 11);
+                    attrViewHight += Application.GetRealHeight(75 + 11);
                     hadDimming = true;
                 }
                 if (hadDimming)
@@ -226,7 +154,66 @@
                 {
                     LoadRgbAttrView(attrView);
                 }
-            }
+
+                var view = new FrameLayout()
+                {
+                    Width = Application.GetRealWidth(343),
+                    Height = Application.GetRealHeight(50),
+                };
+                attrView.AddChidren(view);
+
+
+                var btnClose = new Button()
+                {
+                    X = Application.GetRealWidth(50),
+                    Gravity = Gravity.CenterVertical,
+                    Width = Application.GetRealWidth(98),
+                    Height = Application.GetRealHeight(40),
+                    TextColor = CSS_Color.TextualColor,
+                    SelectedBackgroundColor = CSS_Color.MainColor,
+                    SelectedTextColor = CSS_Color.MainBackgroundColor,
+                    BackgroundColor = CSS_Color.DividingLineColor,
+                    TextID = StringId.OFF,
+                    TextSize = CSS_FontSize.TextFontSize,
+                    Radius = (uint)Application.GetRealWidth(5),
+                };
+                view.AddChidren(btnClose);
+
+                var btnOpen = new Button()
+                {
+                    X = Application.GetRealWidth(100 + 98),
+                    Gravity = Gravity.CenterVertical,
+                    Width = Application.GetRealWidth(98),
+                    Height = Application.GetRealHeight(40),
+                    TextColor = CSS_Color.TextualColor,
+                    SelectedBackgroundColor = CSS_Color.MainColor,
+                    SelectedTextColor = CSS_Color.MainBackgroundColor,
+                    BackgroundColor = CSS_Color.DividingLineColor,
+                    TextID = StringId.On,
+                    TextSize = CSS_FontSize.TextFontSize,
+                    Radius = (uint)Application.GetRealWidth(5),
+                };
+                view.AddChidren(btnOpen);
+
+                btnClose.MouseUpEventHandler = (sender, e) =>
+                {
+                    btnClose.IsSelected = true;
+                    btnOpen.IsSelected = false;
+                    var d = new Dictionary<string, string>();
+                    d.Add(FunctionAttributeKey.OnOff, "off");
+                    group.Control(d);
+                };
+                btnOpen.MouseUpEventHandler = (sender, e) =>
+                {
+                    btnClose.IsSelected = false;
+                    btnOpen.IsSelected = true;
+
+                    var d = new Dictionary<string, string>();
+                    d.Add(FunctionAttributeKey.OnOff, "on");
+                    group.Control(d);
+                };
+
+
 
             contentView.Height = Application.GetRealHeight(52 + 44) + attrViewHight;
             contentView.Gravity = Gravity.Center;
@@ -324,7 +311,7 @@
             {
                 btnBrightnessText.Text = Language.StringByID(StringId.Brightness) + " " + e + "%";
 
-                var d = new Dictionary<string, object>();
+                var d = new Dictionary<string, string>();
                 d.Add(FunctionAttributeKey.Brightness, e.ToString());
                 group.Control(d);
             };
@@ -355,7 +342,7 @@
             #region 鑹叉俯
             var cctView = new FrameLayout()
             {
-                Height = Application.GetRealHeight(54 + 11)
+                Height = Application.GetRealHeight(75 + 11)
             };
             attrView.AddChidren(cctView);
 
@@ -365,7 +352,7 @@
             btnTempClolor.X = Application.GetRealWidth(35);
             btnTempClolor.Y = Application.GetRealHeight(1);
             btnTempClolor.Width = Application.GetRealWidth(224);
-            btnTempClolor.Height = Application.GetRealHeight(21);
+            btnTempClolor.Height = Application.GetRealHeight(42);
             btnTempClolor.TextAlignment = TextAlignment.CenterLeft;
             btnTempClolor.TextColor = CSS_Color.FirstLevelTitleColor;
             btnTempClolor.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
@@ -423,7 +410,7 @@
             };
             barColorTemplatrue.OnStopTrackingTouchEvent = (sender, e) =>
             {
-                var d = new Dictionary<string, object>();
+                var d = new Dictionary<string, string>();
                 d.Add(FunctionAttributeKey.CCT, (barColorTemplatrue.Progress * 100).ToString());
                 group.Control(d);
             };
@@ -511,7 +498,7 @@
             var rgbTemp = new Light();
             colorPicker.MouseUpEventHandler = (sender2, e2) =>
             {
-                var d = new Dictionary<string, object>();
+                var d = new Dictionary<string, string>();
                 d.Add(FunctionAttributeKey.RGB, rgbString);
                 group.Control(d);
             };
@@ -519,7 +506,7 @@
             {
                 rgbString = (e2[0] + "," + e2[1] + "," + e2[2]).ToString();
                 btnCurColor.BackgroundColor = (uint)(0xFF000000 + rgbTemp.GetRGBcolor(rgbString));
-                var d = new Dictionary<string, object>();
+                var d = new Dictionary<string, string>();
                 d.Add(FunctionAttributeKey.RGB, rgbString);
                 group.Control(d);
             };

--
Gitblit v1.8.0