陈嘉乐
2021-01-11 631f94758c3cb42abcdda8094e77895f376eff16
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
@@ -12,23 +12,23 @@
        /// </summary>
        public static void UpdataStates(Light uFunction)
        {
            Application.RunOnMainThread(() =>
            Application.RunOnMainThread((Action)(() =>
            {
                try
                {
                    if (bodyView == null)
                        return;
                    if (uFunction.functionType == bodyView.light.functionType && uFunction.sid == bodyView.light.sid)
                    {
                        bodyView.btnBrightnessText.Text = uFunction.brightness + "%";
                        bodyView.btnBrightnessText.Y = ((100 - uFunction.brightness) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80);
                    if (uFunction.spk == bodyView.light.spk && uFunction.sid == bodyView.light.sid)
                    {
                        if (uFunction.trait_on_off.curValue.ToString() == "on")
                        {
                            bodyView.dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
                            if (!bodyView.onDimmerBar)
                            {
                                bodyView.dimmerBar.Progress = uFunction.brightness;
                            }
                            }
                            bodyView.btnBrightnessText.Text = uFunction.brightness + "%";
                            bodyView.btnBrightnessText.Y = ((100 - uFunction.brightness) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80);
                        }
                        else
                        {
@@ -38,7 +38,7 @@
                        bodyView.barColorTemplatrue.Enable = uFunction.trait_on_off.curValue.ToString() == "on";
                        var cct = 27;
                        int.TryParse(uFunction.Attr_CCT.curValue.ToString(), out cct);
                        bodyView.barColorTemplatrue.Progress = cct;
                        bodyView.barColorTemplatrue.Progress = cct / 100;
                        //设置初始值
                        bodyView.barColorTemplatrue.SetCustomText(bodyView.barColorTemplatrue.Progress * 100 + "K");
@@ -48,7 +48,7 @@
                {
                    MainPage.Log($"{bodyView.GetType().Name } UpdataStates error : {ex.Message}");
                }
            });
            }));
        }
        void LoadEventList()