wxr
2020-09-11 8df24b0a3dfd5b6f39c5393ef24eab25b70ab858
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs
@@ -29,7 +29,11 @@
        /// <summary>
        /// 调光控件
        /// </summary>
        WaveSeekBar dimmerBar;
        WaveSeekBarOn dimmerBar;
        /// <summary>
        /// 亮度显示按钮
        /// </summary>
        Button btnBrightnessText;
        /// <summary>
        /// 开关按钮
        /// </summary>
@@ -41,6 +45,7 @@
        Button btnCollection_Out;
        Button btnFunctionName_Out;
        Button btnFromFloor_Out;
        bool onDimmerBar = false;
        /// <summary>
        /// 刷新显示信息
        /// </summary>
@@ -116,23 +121,46 @@
            };
            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 == 1 ? 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 + "%",
            };
            controlView.AddChidren(btnBrightnessText);
            #region 渐变时间调节
            var btnGradualChangeText = new Button()
@@ -176,6 +204,7 @@
                ProgressBarUnitSring = "s",
                MaxValue = 10,
                Progress = 0,
                SeekBarPadding = Application.GetRealWidth(20),
            };
            controlView.AddChidren(barGradualChange);
@@ -201,8 +230,7 @@
                Height = Application.GetMinRealAverage(40),
                UnSelectedImagePath = "Public/PowerClose.png",
                SelectedImagePath = "Public/PowerOpen.png",
                IsSelected = light.on_off != 0,
                //Tag =
                IsSelected = light.trait_on_off.value.ToString() == "on",
            };
            controlView.AddChidren(btnSwitch);