| | |
| | | /// </summary>
|
| | | public static void UpdataStatus(Function updataTemp)
|
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | Application.RunOnMainThread((Action)(() =>
|
| | | {
|
| | | try
|
| | | {
|
| | |
| | | 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)
|
| | |
| | | {
|
| | | 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; |
| | |
| | | {
|
| | | MainPage.Log($"{bodyView.GetType().Name } UpdataStates error : {ex.Message}");
|
| | | }
|
| | | });
|
| | | }));
|
| | | }
|
| | |
|
| | | void LoadEventList()
|
| | |
| | | }
|
| | | 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)
|
| | | {
|