private void AddCustomAlbum(object obj) { var dialog = new TextBoxWindow(); if (dialog.ShowDialog() == true) { var album = new CustomAlbum() { Name = dialog.ResponseText }; _musicLog.AddAlbum(album, SelectedArtist.Artist); ActiveAlbums.Add(new CustomAlbumViewModel(album)); } }
private void AddCustomArtist(object obj) { var dialog = new TextBoxWindow(); if (dialog.ShowDialog() == true) { var artist = new CustomArtist() { Name = dialog.ResponseText }; _musicLog.AddArtist(artist); ActiveArtists.Add(new CustomArtistViewModel(artist)); } }
private void AddCustomTrack(object obj) { var dialog = new TextBoxWindow(); if (dialog.ShowDialog() == true) { var track = new CustomTrack() { Name = dialog.ResponseText, TrackNo = _musicLog.GetTracks(SelectedAlbum.Album).Count() + 1 }; _musicLog.AddTrack(track, SelectedAlbum.Album); ActiveTracks.Add(new CustomTrackViewModel(track)); } }
private void ChangePlaylistName(object obj) { var activePlaylist = SelectedPlaylist; var dialog = new TextBoxWindow(); if (dialog.ShowDialog() == true) { activePlaylist.Name = dialog.ResponseText; } int index = Playlists.IndexOf(activePlaylist); SelectedPlaylist = null; Playlists.Remove(activePlaylist); Playlists.Insert(index, activePlaylist); SelectedPlaylist = activePlaylist; }
private void AddPlaylist(object obj) { var dialog = new TextBoxWindow(); var playlist = new PlaylistObject(); if (dialog.ShowDialog() == true) { playlist.Name = dialog.ResponseText; if (String.IsNullOrWhiteSpace(playlist.Name)) { return; } } _musicLog.AddPlaylist(playlist); Playlists.Add(playlist); }