private void AddSongFunction() { AddForm newSongForm = new AddForm(null, songViewDoc.songList_); if (newSongForm.ShowDialog() == DialogResult.OK) { Song newSong = new Song(newSongForm.SongTitle, newSongForm.SongAuthor, newSongForm.SongDate, newSongForm.SongGenre); songViewDoc.AddSong(newSong); } }
private void EditSongFunction() { if (songListView.SelectedItems.Count == 0) { return; } Song song = (Song)songListView.SelectedItems[0].Tag; AddForm editSongForm = new AddForm(song, songViewDoc.songList_); if (editSongForm.ShowDialog() == DialogResult.OK) { Song newSong = new Song(editSongForm.SongTitle, editSongForm.SongAuthor, editSongForm.SongDate, editSongForm.SongGenre); songViewDoc.UpdateSong(song, newSong); } }