| | |
| | | /// 更新功能状态 |
| | | /// </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 |
| | | { |
| | |
| | | { |
| | | 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() == "") |
| | |
| | | } |
| | | #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; |
| | | } |
| | | } |
| | | } |