From 3f6685c77beeb12baf840733fb890860f4c26e7c Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期四, 25 七月 2024 17:25:59 +0800 Subject: [PATCH] 2024年07月25日17:24:45 --- HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs | 82 ++++++++++++++++++----------------------- 1 files changed, 36 insertions(+), 46 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs index b25118e..43c592a 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs @@ -122,13 +122,38 @@ int attrViewHight = Application.GetRealHeight(18 + 22); - //鍙湁缁х數鍣� - if (!hadDimming && !hadCCT && !hadRGB) - { attrViewHight += Application.GetRealHeight(50); + if (hadRGB) + { + attrViewHight += Application.GetRealHeight(248); + hadDimming = true; + } + if (hadCCT) + { + attrViewHight += Application.GetRealHeight(75 + 11); + hadDimming = true; + } + if (hadDimming) + { + attrViewHight += Application.GetRealHeight(54 + 11); + } attrView.Height = attrViewHight; contentView.AddChidren(attrView); attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) }); + + + if (hadDimming) + { + LoadDimmingAttrView(attrView); + } + if (hadCCT) + { + LoadCctAttrView(attrView); + } + if (hadRGB) + { + LoadRgbAttrView(attrView); + } var view = new FrameLayout() { @@ -174,7 +199,7 @@ { btnClose.IsSelected = true; btnOpen.IsSelected = false; - var d = new Dictionary<string, object>(); + var d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, "off"); group.Control(d); }; @@ -183,47 +208,12 @@ btnClose.IsSelected = false; btnOpen.IsSelected = true; - var d = new Dictionary<string, object>(); + var d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, "on"); group.Control(d); }; - } - else - { - if (hadRGB) - { - attrViewHight += Application.GetRealHeight(248); - hadDimming = true; - } - if (hadCCT) - { - attrViewHight += Application.GetRealHeight(54 + 11); - hadDimming = true; - } - if (hadDimming) - { - attrViewHight += Application.GetRealHeight(54 + 11); - } - attrView.Height = attrViewHight; - contentView.AddChidren(attrView); - attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) }); - - - if (hadDimming) - { - LoadDimmingAttrView(attrView); - } - if (hadCCT) - { - LoadCctAttrView(attrView); - } - if (hadRGB) - { - LoadRgbAttrView(attrView); - } - } contentView.Height = Application.GetRealHeight(52 + 44) + attrViewHight; contentView.Gravity = Gravity.Center; @@ -321,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); }; @@ -352,7 +342,7 @@ #region 鑹叉俯 var cctView = new FrameLayout() { - Height = Application.GetRealHeight(54 + 11) + Height = Application.GetRealHeight(75 + 11) }; attrView.AddChidren(cctView); @@ -362,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; @@ -420,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); }; @@ -508,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); }; @@ -516,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