private void PlayBis(Playlist playlist) { uPlayer1.Playlist.Clear(); uPlayer1.PlaylistIndex = 0; SearchControl.ClearPlaylist(); foreach (var m in playlist.musics) { uPlayer1.Playlist.Add(m); SearchControl.AddToPlaylist(m.Title); } NetworkClient.SendObject(new RequestBinairies(uPlayer1.Playlist.First())); }
private void PlayBis(Playlist playlist) { uPlayer1.Playlist.Clear(); uPlayer1.PlaylistIndex = 0; SearchControl.ClearPlaylist(); foreach (var m in playlist.musics) { uPlayer1.Playlist.Add(m); SearchControl.AddToPlaylist(m.Title); } ServerManagerService.Instance.SendObject(new RequestBinairies(uPlayer1.Playlist.First())); }
public void RequestAnswerBinaries(RequestAnswer searchAnswer) { Invoke((MethodInvoker) delegate { if (PlaylistContainsMusic(searchAnswer.Binaries.MID)) { SearchControl.SetPlaylistIndex(uPlayer1.PlaylistIndex); } else { uPlayer1.Playlist.Clear(); uPlayer1.PlaylistIndex = 0; SearchControl.ClearPlaylist(); uPlayer1.Playlist.Add(searchAnswer.Binaries); SearchControl.AddToPlaylist(searchAnswer.Binaries.Title); uPlayer1.PlaylistIndex = 0; SearchControl.SetPlaylistIndex(uPlayer1.PlaylistIndex); } uPlayer1.PlayMusic(searchAnswer.Binaries); }); }