public void create(PlayListSong t) { using (TestDbContext context = new TestDbContext()) { context.PlayListSongs.Add(t); context.SaveChanges(); } }
public void delete(PlayListSong t) { using (TestDbContext context = new TestDbContext()) { context.PlayListSongs.Attach(t); context.Entry(t).State = EntityState.Deleted; context.SaveChanges(); } }
public void Play(PlayListSong i_newSong) { bool isVideoMode; m_CurrentSong = i_newSong; isVideoMode = m_CurrentSong.Mode == eSongMode.Video; showVideoMode(isVideoMode); showMinimalSongInfo(); showSongAddOnsInfo(); }
public void ContinuePlaying() { if (PlayListTreeViewer.SelectedNode != null) { PlayListSong song = PlayListTreeViewer.SelectedNode.Tag as PlayListSong; if (song != null) { SongsPlayer.Play(song); SongsPlayer.Visible = true; } } }
private void deleteSongFromPlayList(object sender, RoutedEventArgs e) { Song song = (Song)SongDrid.SelectedItem; PlayList playList = (PlayList)playListDrid.SelectedItem; if (song != null && playList != null) { PlayListSong playListSong = (PlayListSong)controller.complete(TextCommand.READ_PLAY_LIST_SONG_BY_SONG_AND_PLAY_LIST_IDS, new object[] { song.Id, playList.Id }); controller.complete(TextCommand.DELETE_PLAY_LIST_SONG, playListSong); showPlayListSongs(sender, null); } }
private void playSelectedSong() { PlayListSong song = playListBox.SelectedItem as PlayListSong; if (song != null) { SongsPlayer.Play(song); } else { SongsPlayer.Visible = false; } }
private void addToPlayListButton_Click(object sender, EventArgs e) { PlayListSong song = allSongsListBox.SelectedItem as PlayListSong; if (song != null) { addSongToPlayList(song); } else { MessageBox.Show("First Choose a Song from the list!"); } }
private void addSongToPlayList(PlayListSong song) { if (!playListBox.Items.Contains(song)) { playListBox.Items.Add(song); if (EraseButton.Visible == false) { EraseButton.Visible = true; } } else { MessageBox.Show("The song is already in your playlist!"); } }
public PlayListSong update(int id, PlayListSong t) { return(playListSongDao.update(id, t)); }
public void delete(PlayListSong t) { playListSongDao.delete(t); }
public void create(PlayListSong t) { playListSongDao.create(t); }
public PlayListSong update(int id, PlayListSong t) { throw new NotImplementedException(); }