private void tnPlay_Click(object sender, EventArgs e) { string name = dgwSongs.Rows[rowIndex].Cells["ColName"].Value.ToString(); string autor = dgwSongs.Rows[rowIndex].Cells["ColAuthor"].Value.ToString(); Song s = DataProvider.GetSong(name, autor, audioPlatform); songToPlay = s.url; FormListening listening = new FormListening(songToPlay); listening.Show(); }
private void dgwSongs_CellContentClick(object sender, DataGridViewCellEventArgs e) { rowIndex = e.RowIndex; if (dgwSongs.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null) { string name = dgwSongs.Rows[e.RowIndex].Cells["ColName"].Value.ToString(); string autor = dgwSongs.Rows[e.RowIndex].Cells["ColAuthor"].Value.ToString(); Song s = DataProvider.GetSong(name, autor, audioPlatform); songToPlay = s.url; FormListening listening = new FormListening(songToPlay); listening.Show(); } }