xm
2021-11-24 1802b849f0dadc81644fb0a706d6fb45efdf2a20
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
@@ -25,7 +25,7 @@
                            bodyView.dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
                            if (!bodyView.onDimmerBar)
                            {
                                bodyView.dimmerBar.Progress = Convert.ToInt32( updataTemp.GetAttrState(FunctionAttributeKey.Brightness));
                                bodyView.dimmerBar.Progress = Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness));
                            }
                            bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%";
                            bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80);
@@ -59,7 +59,8 @@
            LoadEvet_ChangeFadeTime();
            LoadEvet_ChangeColorTemplatrue();
            //回退刷新信息事件
            actionRefresh = () => {
            actionRefresh = () =>
            {
                btnFunctionName.Text = btnFunctionName_Out.Text = function.name;
                btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
                //function.SaveFunctionData(true);
@@ -70,11 +71,14 @@
        /// </summary>
        void LoadEvet_ChangeFadeTime()
        {
            //barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
            //{
            //    function.fadeTime = e;
            //    function.SaveFunctionData(true);
            //};
            if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
            {
                barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
                {
                    function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
                    function.SaveFunctionFile();
                };
            }
        }
        /// <summary>
@@ -205,7 +209,6 @@
                    function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
                    d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime));
                    if (btnSwitch.IsSelected)
                    {
                        d.Add(FunctionAttributeKey.Brightness, function.lastBrightness.ToString());