Example #1
0
        private void button7_Click(object sender, EventArgs e)
        {
            DAOMedia     daoMedia = new DAOMedia(_caminho_arq_media);
            List <Media> result_media;

            lvFileList.Items.Clear();

            ListViewItem item;

            result_media = daoMedia.localizaMusica("Love");

            foreach (Media media in result_media)
            {
                foreach (Artist artist in media.artistList)
                {
                    foreach (Album album in artist.albumList)
                    {
                        foreach (Music music in album.musicList)
                        {
                            item      = new ListViewItem();
                            item.Name = media.name;
                            item.SubItems.Add(artist.name);
                            item.SubItems.Add(album.name);
                            item.SubItems.Add(music.name);
                            lvFileList.Items.Add(item);
                        }
                    }
                }
            }
        }
Example #2
0
        private void btnLocalizar_Click(object sender, EventArgs e)
        {
            lvFileList.Items.Clear();

            ListViewItem item;

            result_media = daoMedia.localizaMusica(txtNomeMusica.Text);

            foreach (Media media in result_media)
            {
                foreach (Artist artist in media.artistList)
                {
                    foreach (Album album in artist.albumList)
                    {
                        foreach (Music music in album.musicList)
                        {
                            item      = new ListViewItem();
                            item.Name = media.name;
                            item.SubItems.Add(artist.name);
                            item.SubItems.Add(album.name);
                            item.SubItems.Add(music.name);
                            lvFileList.Items.Add(item);
                        }
                    }
                }
            }
        }