| | |
| | | { |
| | | |
| | | ///1秒定时更新状态 |
| | | timerUpdateStatus(); |
| | | TimerUpdateStatus(); |
| | | #region ---界面布局--- |
| | | this.BackgroundColor = MusicColor.ViewColor; |
| | | topView = new TopView(); |
| | |
| | | return name == musicInfo.name; |
| | | })) |
| | | { |
| | | A31MusicModel.Current.LoveMusicInfoList.Add(new Songs { name = name, time = songTime }); |
| | | A31MusicModel.Current.LoveMusicInfoList.Add(new SongInfo { name = name, time = songTime }); |
| | | } |
| | | } |
| | | else |
| | |
| | | ///下拉刷新 |
| | | myListView.verticalScrolViewLayout.BeginHeaderRefreshingAction += () => |
| | | { |
| | | System.Threading.Tasks.Task.Run(() => |
| | | System.Threading.Tasks.Task.Run((Action)(() => |
| | | { |
| | | try |
| | | { |
| | | A31MusicModel.Current.palyLists.Clear(); |
| | | if (A31MusicModel.Current.palyLists.Count == 0) |
| | | A31MusicModel.Current.CurrentPlayMusicInfoList.Clear(); |
| | | if (A31MusicModel.Current.CurrentPlayMusicInfoList.Count == 0) |
| | | { |
| | | SendMethod.Current.GetPalyList(A31MusicModel.Current.functionMusic); |
| | | SendMethod.Current.GetCurrentPalyList(A31MusicModel.Current.functionMusic); |
| | | |
| | | } |
| | | } |
| | |
| | | myListView.verticalScrolViewLayout.EndHeaderRefreshing(); |
| | | myListView.verticalScrolViewLayout.RemoveAll(); |
| | | var listName = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playlist_name); |
| | | var source = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.source); |
| | | var musicList = A31MusicModel.Current.GetSongList(listName); |
| | | A31SongPlay.SongListView(myListView.verticalScrolViewLayout, musicList, listName, myListView.popFra); |
| | | |
| | | A31SongPlay.SongListView(myListView.verticalScrolViewLayout, musicList, listName, source, myListView.popFra); |
| | | }); |
| | | } |
| | | }); |
| | | })); |
| | | //结束刷新 |
| | | |
| | | }; |
| | |
| | | /// <summary> |
| | | /// 定时更新状态 |
| | | /// </summary> |
| | | void timerUpdateStatus() |
| | | void TimerUpdateStatus() |
| | | { |
| | | timerThread = new System.Threading.Thread((obj) => |
| | | { |
| | |
| | | void PlayListView(FrameLayout frameLayout, VerticalRefreshLayout verticalScrolViewLayout) |
| | | { |
| | | verticalScrolViewLayout.RemoveAll(); |
| | | //获取播放器名称 |
| | | var listName = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playlist_name); |
| | | var source = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.source); |
| | | //获取缓存歌曲列表 |
| | | var musicList = A31MusicModel.Current.GetSongList(listName); |
| | | if (musicList.Count == 0) |
| | | { |
| | | System.Threading.Tasks.Task.Run(() => |
| | | System.Threading.Tasks.Task.Run((Action)(() => |
| | | { |
| | | try |
| | | { |
| | | A31MusicModel.Current.palyLists.Clear(); |
| | | if (A31MusicModel.Current.palyLists.Count == 0) |
| | | A31MusicModel.Current.CurrentPlayMusicInfoList.Clear(); |
| | | if (A31MusicModel.Current.CurrentPlayMusicInfoList.Count == 0) |
| | | { |
| | | //获取歌曲列表 |
| | | SendMethod.Current.GetPalyList(A31MusicModel.Current.functionMusic); |
| | | SendMethod.Current.GetCurrentPalyList(A31MusicModel.Current.functionMusic); |
| | | |
| | | } |
| | | } |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | musicList = A31MusicModel.Current.GetSongList(listName); |
| | | A31SongPlay.SongListView(verticalScrolViewLayout, musicList, listName, frameLayout); |
| | | A31SongPlay.SongListView(verticalScrolViewLayout, musicList, listName, source, frameLayout); |
| | | }); |
| | | } |
| | | }); |
| | | })); |
| | | } |
| | | else |
| | | { |
| | | A31SongPlay.SongListView(verticalScrolViewLayout, musicList, listName, frameLayout); |
| | | A31SongPlay.SongListView(verticalScrolViewLayout, musicList, listName, source, frameLayout); |
| | | } |
| | | } |
| | | /// <summary> |