示例#1
0
 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()));
 }
示例#2
0
 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()));
 }
示例#3
0
 private void SearchControl_AddPlaylistEvent(object sender, EventArgs e)
 {
     if (SearchControl.selected is Music)
     {
         uPlayer1.Playlist.Add(SearchControl.selected as Music);
         SearchControl.AddToPlaylist((SearchControl.selected as Music).Title);
     }
     else if (SearchControl.selected is Album)
     {
         foreach (var m in (SearchControl.selected as Album).Musics)
         {
             uPlayer1.Playlist.Add(m);
             SearchControl.AddToPlaylist(m.Title);
         }
         if (uPlayer1.PlaylistIndex == 0)
         {
             uPlayer1.PlayMusic(uPlayer1.Playlist.First());
         }
     }
 }
示例#4
0
        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);
            });
        }