예제 #1
0
        private async Task LoadFromFolder(CancellationToken token)
        {
            using (BusyStack.GetToken())
            {
                var options = new FileSystemFolderBrowserOptions()
                {
                    IncludeSubFolders = false,
                    CanCancel         = true,
                    MultiSelection    = false,
                    Title             = _translator.Translate(nameof(Resources.SelectFolder)),
                };

                (var Result, var MediaItems) = await _dialogViewModel.ShowMediaItemFolderSelectionDialog(options, token).ConfigureAwait(true);

                if (Result)
                {
                    AddRange(MediaItems);
                }
            }
        }