Beispiel #1
0
        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());
                        }
                    }
                }
            }
        }
Beispiel #2
0
        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();
        }