This project has moved. For the latest updates, please go here.

Create a playlist with listbox

Aug 8, 2013 at 7:33 AM
I am relatively new to C# programming and Naudio.
I want to create a simple audio player, but instead of loading one file into the program I want people to select multiple songs, show them in a listbox and then play the selected song.

I had code like this for the "axwindowsmediaplayer1" player I made, but can't figure it out on Naudio
private void btnBrowse_Click_1(object sender, EventArgs e)
        {
            OpenFileDialog openFile = new OpenFileDialog();
            openFile.Multiselect = true;

            if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                files = openFile.SafeFileNames;
                paths = openFile.FileNames;
                for (int i = 0; i < files.Length; i++)
                {
                    ItemList.Items.Add(files[i]);
                }
            }
I hope someone here can help me out with this.
  • Jeroen