beginner91
Member
- Joined
- Mar 29, 2012
- Messages
- 7
- Programming Experience
- Beginner
I am making a media player in a windows form application in microsoft visual studio. I have two forms - one for display the songs with buttons for playing, pausing and stopping the songs. The second form is for creating a playlist. This form has two listboxes with an add, remove and create button and a textbox to enter the name of the playlist. The first listbox displays all the songs in the media player and the second listbox is for the playlist which is populated by adding the songs from the first listbox.
So I have the code for the create playlist button but now I want to display the name of the playlists created in a listbox in the first form.
heres the code I used for creating the playlist:
and i just have an empty listbox in the first form:
I don't know if the create playlist code is working since I'm not displaying the playlists anywhere but I hope someone can help me with this
So I have the code for the create playlist button but now I want to display the name of the playlists created in a listbox in the first form.
heres the code I used for creating the playlist:
private void button1_Click(object sender, EventArgs e) //create playlist { Playlist temp = new Playlist(textBoxPlaylist.Text); foreach(string name in PlaylistTracks.Items) { temp.addSong(name); } myPlaylistsCollection.Add(temp); }
and i just have an empty listbox in the first form:
private void listBoxPlaylist_SelectedIndexChanged(object sender, EventArgs e) { //need to display the playlists created }
I don't know if the create playlist code is working since I'm not displaying the playlists anywhere but I hope someone can help me with this