/// <summary> /// Event raised when the user creates a new playlist. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnCreatePlaylist(object sender, RoutedEventArgs e) { //Prompt users to name the playlist. CreatePlaylistDialog playlistDialog = new CreatePlaylistDialog(); if (playlistDialog.ShowDialog() == true) { String playlistName = playlistDialog.PlaylistName; //Create the playlist in Spotify first. Playlist newPlaylist = SpotifyClientService.Client.CreatePlaylist(playlistName, SpotifyClientService.User.Id); this.NavigationControl.OnCreatePlaylist(newPlaylist); } }
/// <summary> /// Event raised when the user creates a new playlist. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnCreatePlaylist(object sender, RoutedEventArgs e) { //Prompt users to name the playlist. CreatePlaylistDialog playlistDialog = new CreatePlaylistDialog(); if (playlistDialog.ShowDialog() == true) { String playlistName = playlistDialog.PlaylistName; //Create the playlist in Spotify first. Playlist newPlaylist = SpotifyClientService.Client.CreatePlaylist(playlistName, SpotifyClientService.User.Id); this.NavigationControl.OnCreatePlaylist(newPlaylist); } }