Ejemplo n.º 1
0
        private void loadPlaylist()
        {
            foreach (Song song in this.playlist)
            {
                if (i == 0) //also play it
                {
                    pictureBox1.Image = getImage(song.Picture);
                    songLabel.Text    = song.Name;
                    artistLabel.Text  = song.Artist;
                    currentlyPlaying  = song;

                    downloaded(song);

                    string path = @"Downloaded Songs\" + song.Name + ".mp3";
                    player.URL = path;
                    //player.controls.play(); //play the song

                    Song_Form sf = new Song_Form(); //display in flowlayoutpanel
                    sf.Song = song;
                    sf.loadSong();

                    sf.makeButt_invisible();

                    if (i % 2 == 0)
                    {
                        sf.BackColor = light_blue;
                    }
                    else
                    {
                        sf.BackColor = dark_blue;
                    }


                    flowLayoutPanel1.Controls.Add(sf);
                }
                else//just add it into the list
                {
                    Song_Form sf = new Song_Form(); //display in flowlayoutpanel
                    sf.Song = song;
                    sf.loadSong();

                    if (i % 2 == 0)
                    {
                        sf.BackColor = light_blue;
                    }
                    else
                    {
                        sf.BackColor = dark_blue;
                    }

                    flowLayoutPanel1.Controls.Add(sf);
                }

                i++;
            }
        }
Ejemplo n.º 2
0
        private void loadPlaylist()
        {
            foreach (Song song in this.playlist)
            {
                Song_Form sf = new Song_Form(); //display in flowlayoutpanel
                sf.Song = song;
                sf.loadSong();

                if (i % 2 == 0)
                {
                    sf.BackColor = light_blue;
                }
                else
                {
                    sf.BackColor = dark_blue;
                }

                flowLayoutPanel1.Controls.Add(sf);
                i++;
            }
        }