Ejemplo n.º 1
0
        private void tsbPlaylist_Click(object sender, EventArgs e)
        {
            if (currentplaylist == null)
            {
                currentplaylist = new Playlist();
            }
            var mappingDialog = new PlaylistDialog(this.Service, this.targetService, currentplaylist, chkUseBulk.Checked, nudBulkCount.Value);

            mappingDialog.ShowDialog(ParentForm);
            currentplaylist = mappingDialog.Playlist;
        }
        /// <summary>
        /// Set Playlist
        /// </summary>
        /// <param name="response">Playlist Response</param>
        private async void SetPlaylist(PlaylistResponse response)
        {
            var dialog = new PlaylistDialog(response);
            var result = await dialog.ShowAsync();

            if (result == ContentDialogResult.Primary &&
                dialog.SetPlaylist.Result.IsSuccess)
            {
                Refresh();
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Add Playlist
        /// </summary>
        private async void AddPlaylist()
        {
            var current = await Client.GetCurrentUserAsync();

            var dialog = new PlaylistDialog(current);
            var result = await dialog.ShowAsync();

            if (result == ContentDialogResult.Primary &&
                dialog.AddPlaylist.Result.IsSuccess)
            {
                NavigatePage(dialog.AddPlaylist.Result);
            }
        }