| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Shared; |
| | | using HDL_ON.UI.Music; |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Music |
| | | { |
| | | public class UpdateThread : FrameLayout |
| | | public class UpdateThread |
| | | { |
| | | public UpdateThread() |
| | | { |
| | | } |
| | | |
| | | public static void updateThread(FrameLayout frame, VerticalRefreshLayout middViewLayout) |
| | | /// <summary> |
| | | /// 定时更新当前播放音乐 |
| | | /// </summary> |
| | | /// <param name="frame">当前界面</param> |
| | | /// <param name="middViewLayout">每一条音乐的主控件</param> |
| | | /// <param name="a31MusicModel">点前播放器</param> |
| | | public static void updateThread(FrameLayout frame, VerticalRefreshLayout middViewLayout, A31MusicModel a31MusicModel) |
| | | { |
| | | System.Threading.Thread updateSelectedMusicThread = new System.Threading.Thread(() => |
| | | { |
| | |
| | | { |
| | | for (int i = 0; i < middViewLayout.ChildrenCount; i++) |
| | | { |
| | | FrameLayout view = (FrameLayout)middViewLayout.GetChildren(i); |
| | | RowLayout view = (RowLayout)middViewLayout.GetChildren(i); |
| | | var volIconBtn = (Button)view.GetChildren(0);//直接FrameLayout父控件找到该控件Button |
| | | var songNameBtn = (Button)view.GetChildren(1);//直接FrameLayout父控件找到该控件Button |
| | | var artistNameBtn = (Button)view.GetChildren(2);//直接FrameLayout父控件找到该控件Button |
| | | if (A31MusicModel.Current.A31PlayStatus.TrackURL == songNameBtn.Tag.ToString()) |
| | | if (a31MusicModel.A31PlayStatus.TrackURL == songNameBtn.Tag.ToString()) |
| | | { |
| | | volIconBtn.Visible = true; |
| | | songNameBtn.TextColor = UI.Music.Color.SelectedColor; |