From 7d005a7618e3d7a80d8ede3baf6ecc4bf8019cd5 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 01 九月 2020 15:22:09 +0800 Subject: [PATCH] 2020-09-01 --- HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs | 36 ++++++++++++++++++++++++++++++------ 1 files changed, 30 insertions(+), 6 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs index b79f289..6da5522 100644 --- a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs +++ b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs @@ -14,7 +14,7 @@ /// 鏇存柊鍔熻兘鐘舵�� /// </summary> /// <param name="updataFunction"></param> - public void UpdataStates(Function updataFunction, FrameLayout view, VerticalScrolViewLayout scrolView) + public void UpdataStates(Function updataFunction, FrameLayout view, VerticalScrolViewLayout scrolView,Room room=null) { try { @@ -24,6 +24,14 @@ { return; } + if (room != null) + { + if (!updataFunction.roomIdList.Contains(room.sid)) + { + return; + } + } + //if(updataFunction.roomIdList.Contains(Room)) for (int i = 0; i < scrolView.ChildrenCount; i++) { if (scrolView.GetChildren(i).Tag == null || scrolView.GetChildren(i).Tag.ToString() == "") @@ -50,7 +58,7 @@ { try { - (fcView.GetChildren(j) as Button).IsSelected = updataFunction.on_off == "on"; + (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.value.ToString() == "on"; } catch (Exception ex) { @@ -63,7 +71,7 @@ { try { - if (updataFunction.on_off == "on") + if (updataFunction.trait_on_off.value.ToString() == "on") { (fcView.GetChildren(j) as DiyImageSeekBar).Progress = (updataFunction as Light).brightness; (fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.AuxiliaryColor1; @@ -85,7 +93,7 @@ { try { - (fcView.GetChildren(j) as Button).IsSelected = updataFunction.on_off == "on"; + (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.value.ToString() == "on"; (fcView.GetChildren(j) as Button).Text = updataFunction.lastState; } catch (Exception ex) @@ -102,7 +110,7 @@ { try { - (fcView.GetChildren(j) as Button).IsSelected = uCurtain.on_off == "off"; + (fcView.GetChildren(j) as Button).IsSelected = uCurtain.trait_on_off.value.ToString() == "off"; } catch (Exception ex) { @@ -113,7 +121,7 @@ { try { - (fcView.GetChildren(j) as Button).IsSelected = uCurtain.on_off == "on"; + (fcView.GetChildren(j) as Button).IsSelected = uCurtain.trait_on_off.value.ToString() == "on"; } catch (Exception ex) { @@ -122,6 +130,22 @@ } #endregion break; + case FunctionCategory.Music: + #region 闊充箰鏇存柊 + var uMusic = updataFunction as Music.A31MusicModel; + if (cTag == updataFunction.functionType + "_State_" + updataFunction.sid) + { + try + { + (fcView.GetChildren(j) as Button).IsSelected = uMusic.A31PlayStatus.status == "play" ; + } + catch (Exception ex) + { + MainPage.Log($"{this.GetType()} error 3 : {ex.Message}"); + } + } + #endregion + break; } } } -- Gitblit v1.8.0