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); } } } } }
private void FrmPrincipal_Load(object sender, EventArgs e) { daoMedia = new DAOMedia(_caminho_arq_media); }
private void button6_Click(object sender, EventArgs e) { DAOMedia daoMedia = new DAOMedia(_caminho_arq_media); daoMedia.excluir(_media); }
private void button4_Click_1(object sender, EventArgs e) { DAOMedia daoMedia = new DAOMedia(_caminho_arq_media); daoMedia.inserir(_media); }
private void button5_Click(object sender, EventArgs e) { Music music = new Music(); music.ord=1; music.name = "01 No Coração de Deus.mp3"; Album album = new Album(); album.musicList = new List<Music>(); album.name = "sonhos"; album.path = "angelo torres"; album.musicList.Add(music); music = new Music(); music.ord = 2; music.name = "02 Nação de Adoradores.mp3"; album.musicList.Add(music); music = new Music(); music.ord = 3; music.name = "03 Chegar aTi.mp3"; album.musicList.Add(music); Artist artist = new Artist(); artist.name = "angelo torres"; artist.path = "teste_media"; artist.albumList.Add(album); Media media = new Media(); media.name = "teste_media"; media.description = "media criada somente para fazer um teste de inserção"; media.artistList.Add(artist); DAOMedia daoMedia = new DAOMedia(_caminho_arq_media); daoMedia.inserir(media); }
private void FrmListaMedia_Load(object sender, EventArgs e) { daoMedia = new DAOMedia(caminho_arq_media); }
private void FrmConsultarMusica_Load(object sender, EventArgs e) { daoMedia = new DAOMedia(caminho_arq_media); }