wei
2020-12-18 c96d59d6b6379acb0fd899ad2e255a121ee6c8c6
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -217,9 +217,26 @@
                new System.Threading.Thread(() =>
                {
                    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("on_off", function.trait_on_off.curValue.ToString());
                    Control.Ins.SendWriteCommand(function, d);
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    if (function.spk == SPK.LightDimming || function.spk == SPK.LightRGB)
                    {
                        var light = function as Light;
                        d.Add(FunctionAttributeKey.OnOff, light.trait_on_off.curValue.ToString());
                        if (btnSwitch.IsSelected)
                        {
                            d.Add(FunctionAttributeKey.Brightness, light.lastBrightness.ToString());
                        }
                        else
                        {
                            light.lastBrightness = light.brightness;
                        }
                        Control.Ins.SendWriteCommand(light, d);
                    }
                    else
                    {
                        d.Add("on_off", function.trait_on_off.curValue.ToString());
                        Control.Ins.SendWriteCommand(function, d);
                    }
                })
                { IsBackground = true }.Start();
            };
@@ -348,11 +365,8 @@
                                {
                                    ShowMesBtnState(pushMessageInfoList[0], true);
                                });
                            }
                        }
                    }
                    else
                    {
@@ -366,9 +380,7 @@
                {
                    isGetting = false;
                }
            });
        }
        /// <summary>