From 068c68295cad1967f7aafb4e5e951260ef03d4ce Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期五, 09 七月 2021 09:16:43 +0800 Subject: [PATCH] 状态属性更改,不要轻易合并 --- HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs index 6fc5a4a..2a22bab 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs @@ -11,7 +11,7 @@ /// </summary> public static void UpdataState(Function updataTemp) { - Application.RunOnMainThread(() => + Application.RunOnMainThread((Action)(() => { try { @@ -19,14 +19,14 @@ return; if (updataTemp.spk == bodyView.function.spk && updataTemp.sid == bodyView.function.sid) { - bodyView.btnSwitch.IsSelected = bodyView.btnSwitchIcon.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on"; + bodyView.btnSwitch.IsSelected = bodyView.btnSwitchIcon.IsSelected = updataTemp.trait_on_off.state.ToString() == "on"; } } catch (Exception ex) { MainPage.Log($"RelayPage error {ex.Message}"); } - }); + })); } /// <summary> /// 鍔犺浇浜嬩欢鍒楄〃 @@ -65,9 +65,9 @@ btnSwitch.IsSelected = btnSwitchIcon.IsSelected = !btnSwitchIcon.IsSelected; new System.Threading.Thread(() => { - function.trait_on_off.curValue = btnSwitchIcon.IsSelected ? "on" : "off"; + function.trait_on_off.state = btnSwitchIcon.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()); + d.Add("on_off", function.trait_on_off.state.ToString()); DriverLayer.Control.Ins.SendWriteCommand(function, d); }) { IsBackground = true }.Start(); @@ -77,9 +77,9 @@ btnSwitchIcon.IsSelected = btnSwitch.IsSelected = !btnSwitch.IsSelected; new System.Threading.Thread(() => { - function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off"; + function.trait_on_off.state = 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()); + d.Add("on_off", function.trait_on_off.state.ToString()); DriverLayer.Control.Ins.SendWriteCommand(function, d); }) { IsBackground = true }.Start(); -- Gitblit v1.8.0