public void Play(Track track, MusicTab tab) { if (track == null) { return; } Stop(); track.Download(); CurrentTrack = track; CurrentTab = tab; Load(track, tab); Play(); }
public void Play(int Index) { if (Index >= Tracks.Count || Index < 0) { return; } Track track = Tracks[Index]; if (track.IsOnline || track.IsOffline) { track.Download(); PlaylistView.Items[Index] = track.GetListViewItem(PlaylistView); MainWindow.SavePlaylists(); } musicPlayer.CurrentTab = this; musicPlayer.CurrentTrack = track; musicPlayer.Stop(); musicPlayer.Load(track, this); musicPlayer.Play(); //RemoveTrack(Index); }