Exemple #1
0
        public static async Task <List <MusicPlaybackItem> > AddFailedFilePath(
            List <Tuple <StorageFile, string> > failedItems)
        {
            if (Current != null)
            {
                Current.Hide();
            }
            var source = new TaskCompletionSource <List <MusicPlaybackItem> >();
            await Windows.ApplicationModel.Core
            .CoreApplication.MainView.CoreWindow
            .Dispatcher.RunAsync(
                Windows.UI.Core.CoreDispatcherPriority.Normal,
                async() =>
            {
                var dialog = new FileOpenFailure(failedItems);
                await dialog.ShowAsync();
                source.SetResult(dialog.Added);
            });

            return(await source.Task);
        }
Exemple #2
0
 private void OnOpened(ContentDialog sender, ContentDialogOpenedEventArgs args)
 {
     Current = this;
 }
Exemple #3
0
 private void OnClosed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     Current = null;
 }