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/ColorTureLampPageBLL.cs | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs index 2bb7c7b..3fcc959 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs @@ -12,7 +12,7 @@ /// </summary> public static void UpdataStatus(Function updataTemp) { - Application.RunOnMainThread(() => + Application.RunOnMainThread((Action)(() => { try { @@ -20,7 +20,7 @@ return; if (updataTemp.spk == bodyView.function.spk && updataTemp.sid == bodyView.function.sid) { - if (updataTemp.trait_on_off.curValue.ToString() == "on") + if (updataTemp.trait_on_off.state.ToString() == "on") { bodyView.dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1); if (!bodyView.onDimmerBar) @@ -34,8 +34,8 @@ { bodyView.dimmerBar.SetProgressBarColors(CSS_Color.DividingLineColor, CSS_Color.DividingLineColor); } - bodyView.btnSwitch.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on"; - bodyView.barColorTemplatrue.Enable = updataTemp.trait_on_off.curValue.ToString() == "on"; + bodyView.btnSwitch.IsSelected = updataTemp.trait_on_off.state.ToString() == "on"; + bodyView.barColorTemplatrue.Enable = updataTemp.trait_on_off.state.ToString() == "on"; var cct = 27; int.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.CCT), out cct); bodyView.barColorTemplatrue.Progress = cct / 100; @@ -48,7 +48,7 @@ { MainPage.Log($"{bodyView.GetType().Name } UpdataStates error : {ex.Message}"); } - }); + })); } void LoadEventList() @@ -202,9 +202,9 @@ } 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(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString()); + d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.state.ToString()); d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime)); if (btnSwitch.IsSelected) { -- Gitblit v1.8.0