wxr
2022-10-27 38df05b600e7a41106f710a3e4287e37fbf35d03
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -8,6 +8,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Shared;
using Com.Hdl;
namespace HDL_ON.UI
{
@@ -193,7 +194,8 @@
#if DEBUG
                btnResidenceName.MouseUpEventHandler = (sender, e) =>
                {
                    Com.Hdl.HDLToDaHai.InitApplication(Shared.Application.Activity.Application);
                    Com.Hdl.HDLToDaHai.OpneActivity(Shared.Application.Activity);
                };
#endif
@@ -1257,31 +1259,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();
            //};