wei
2020-12-22 d07d62be7111d78b2aaa44c9cdee23a7d22b4dda
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
old mode 100755 new mode 100644
@@ -64,7 +64,7 @@
        /// </summary>
        void LoadEvet_ChangeFadeTime()
        {
            barFadeTime.OnProgressChangedEvent = (sender, e) =>
            barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
            {
                light.fadeTime = e;
                light.SaveFunctionData(true);
@@ -78,8 +78,19 @@
        {
            barColorTemplatrue.OnProgressChangedEvent += (sender, value) =>
            {
                //设置自定义的文本
                barColorTemplatrue.SetCustomText(value * 100 + "K");
                new System.Threading.Thread(() =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        //设置自定义的文本
                        barColorTemplatrue.SetCustomText(value * 100 + "K");
                        light.Attr_CCT.curValue = value * 100;
                        System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                        d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
                        Control.Ins.SendWriteCommand(light, d);
                    });
                    System.Threading.Thread.Sleep(200);
                }).Start();
            };
        }
@@ -123,7 +134,6 @@
                if (e == 0 || e == 100)
                {
                    //Control.Send(CommandType_A.write, this.light);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.Brightness, light.brightness.ToString());
                    Control.Ins.SendWriteCommand(light, d);
@@ -170,6 +180,7 @@
                    light.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, light.trait_on_off.curValue.ToString());
                    d.Add(FunctionAttributeKey.FadeTime, light.fadeTime.ToString());
                    if (btnSwitch.IsSelected)
                    {
                        d.Add(FunctionAttributeKey.Brightness, light.lastBrightness.ToString());