xm
2021-11-24 1802b849f0dadc81644fb0a706d6fb45efdf2a20
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -62,11 +62,14 @@
        /// </summary>
        void LoadEvet_ChangeFadeTime()
        {
            barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
            if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
            {
                function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
                function.UpdataFuncitonInfo();
            };
                barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
                {
                    function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
                    function.SaveFunctionFile();
                };
            }
        }
        /// <summary>
@@ -91,7 +94,6 @@
            dimmerBar.OnStopTrackingTouchEvent = (sender, e) => {
                onDimmerBar = false;
                function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress);
                function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress);
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString());
                Control.Ins.SendWriteCommand(function, d);
@@ -142,7 +144,6 @@
        {
            btnSwitch.MouseUpEventHandler += (sender, e) =>
            {
                function.SetAttrState(FunctionAttributeKey.FadeTime, barFadeTime.Progress);
                btnSwitch.IsSelected = !btnSwitch.IsSelected;
                if (btnSwitch.IsSelected)
                {
@@ -157,7 +158,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)
                    {
                        if(function.lastBrightness == 0)