From 47769b2c2554d2b0f37237c1658044bd3a5bb6f7 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 27 九月 2022 14:05:03 +0800 Subject: [PATCH] 光伏更新 --- HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index 4ab1481..d89790d 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -1296,14 +1296,17 @@ view.AddChidren(btnAcstPower); btnAcstPower.MouseUpEventHandler = (sender, e) => { btnAcstPower.IsSelected = !btnAcstPower.IsSelected; - 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()) + new System.Threading.Thread(() => { - Control.Ins.SendWriteCommand(temp, d); - } - + 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(); }; -- Gitblit v1.8.0