wxr
2022-10-26 23ad902a6844438966d48deb25a89614c6ee5477
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -1257,31 +1257,31 @@
            };
            Button btnAcstPower = new Button()
            {
                X = Application.GetRealWidth(115),
                Y = Application.GetRealHeight(70),
                Width = Application.GetRealWidth(32),
                Height = Application.GetRealWidth(32),
                SelectedImagePath = "Public/PowerOpen.png",
                UnSelectedImagePath = "Public/PowerClose.png",
                IsSelected = function.trait_on_off.curValue.ToString() == "on",
            };
            view.AddChidren(btnAcstPower);
            btnAcstPower.MouseUpEventHandler = (sender, e) => {
                btnAcstPower.IsSelected = !btnAcstPower.IsSelected;
                new System.Threading.Thread(() =>
                {
                    string onoff = btnAcstPower.IsSelected ? "on" : "off";
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.OnOff, onoff);
                    foreach (var temp in FunctionList.List.GetAcstParentList())
                    {
                        Control.Ins.SendWriteCommand(temp, d);
                    }
                })
                { IsBackground = true }.Start();
            };
            //Button btnAcstPower = new Button()
            //{
            //    X = Application.GetRealWidth(115),
            //    Y = Application.GetRealHeight(70),
            //    Width = Application.GetRealWidth(32),
            //    Height = Application.GetRealWidth(32),
            //    SelectedImagePath = "Public/PowerOpen.png",
            //    UnSelectedImagePath = "Public/PowerClose.png",
            //    IsSelected = function.trait_on_off.curValue.ToString() == "on",
            //};
            //view.AddChidren(btnAcstPower);
            //btnAcstPower.MouseUpEventHandler = (sender, e) => {
            //    btnAcstPower.IsSelected = !btnAcstPower.IsSelected;
            //    new System.Threading.Thread(() =>
            //    {
            //        string onoff = btnAcstPower.IsSelected ? "on" : "off";
            //        Dictionary<string, string> d = new Dictionary<string, string>();
            //        d.Add(FunctionAttributeKey.OnOff, onoff);
            //        foreach (var temp in FunctionList.List.GetAcstParentList())
            //        {
            //            Control.Ins.SendWriteCommand(temp, d);
            //        }
            //    })
            //    { IsBackground = true }.Start();
            //};