wei
2020-11-27 e53a1951d6aa07ad22aad9816da4703496fcbccd
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -147,7 +147,7 @@
                        {
                            if (view.Tag.ToString() == function.sid)
                            {
                                var state = function.trait_on_off.value.ToString() == "on";
                                var state = function.trait_on_off.curValue.ToString() == "on";
                                for (int i = 0; i < view.ChildrenCount; i++)
                                {
                                    if (view.GetChildren(i).GetType() == typeof(Button))
@@ -207,9 +207,9 @@
                btnSwitch.IsSelected = !btnSwitch.IsSelected;
                new System.Threading.Thread(() =>
                {
                    function.trait_on_off.value = btnSwitch.IsSelected ? "on" : "off";
                    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.value.ToString());
                    d.Add("on_off", function.trait_on_off.curValue.ToString());
                    Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();
@@ -240,10 +240,10 @@
            btnClose.MouseUpEventHandler = (sender, e) =>
            {
                btnClose.IsSelected = false;
                curtain.trait_on_off.value = "off";
                curtain.trait_on_off.curValue = "off";
                curtain.percent = 0;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("on_off",curtain.trait_on_off.value.ToString());
                d.Add("on_off",curtain.trait_on_off.curValue.ToString());
                Control.Ins.SendWriteCommand(curtain, d);
            };
@@ -254,10 +254,10 @@
            btnOpen.MouseUpEventHandler = (sender, e) =>
            {
                btnOpen.IsSelected = false;
                curtain.trait_on_off.value = "on";
                curtain.trait_on_off.curValue = "on";
                curtain.percent = 100;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("on_off", curtain.trait_on_off.value.ToString());
                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
                Control.Ins.SendWriteCommand(curtain, d);
            };
        }