private void DisplaySelectedSongs() { lbPlayingSongs.Items.Clear(); Playlist tempPlayList = new Playlist("Temp"); for (int i = 0; i < cblstSongs.Items.Count; i++) { if (cblstSongs.GetItemChecked(i)) { string songName = ReturnSongName(i); foreach (Song s in musicStation.AllSongs) { if (s.Name == songName) { tempPlayList.Add(s); lbPlayingSongs.Items.Add(s.ToString()); } } } } }
private void AddSongToPlaylist() { lbPlayingSongs.Items.Clear(); List <Playlist> playlist = musicStation.AllPlaylists; Playlist thisPlaylist = playlist[cbPlayList.SelectedIndex]; for (int i = 0; i < cblstSongs.Items.Count; i++) { if (cblstSongs.GetItemChecked(i)) { string songName = ReturnSongName(i); foreach (Song s in musicStation.AllSongs) { if (s.Name == songName) { thisPlaylist.Add(s); lbPlayingSongs.Items.Add(s.ToString()); } } } } ClearChecked(); }