Esempio n. 1
0
        /// <summary>
        /// Shows the file picker so that the user can pick multiple files.
        /// </summary>
        /// <param name="settings">The settings for the file open picker.</param>
        /// <returns>
        /// When the call to this method completes successfully, it returns a
        /// <see cref="IReadOnlyList{StorageFile}" /> object that contains all the files that were
        /// picked by the user. Picked files in this array are represented by
        /// <see cref="StorageFile" /> objects.
        /// </returns>
        public IAsyncOperation <IReadOnlyList <StorageFile> > PickMultipleFilesAsync(FileOpenPickerSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            Logger.Write($"Commit button text: {settings.CommitButtonText}");

            var dialog = new FileOpenPickerWrapper(settings);

            return(dialog.PickMultipleFilesAsync());
        }
Esempio n. 2
0
		private async void PickMultipleFiles()
		{
			var settings = new FileOpenPickerSettings
			{
				SuggestedStartLocation = PickerLocationId.DocumentsLibrary,
				FileTypeFilter = new List<string> { ".txt" }
			};

			IReadOnlyList<StorageFile> storageFiles = await dialogService.PickMultipleFilesAsync(settings);
			if (storageFiles.Any())
			{
				MultipleFilesPath = string.Join(";", storageFiles.Select(storageFile => storageFile.Path));
			}
		}
Esempio n. 3
0
		private async void PickSingleFile()
		{
			var settings = new FileOpenPickerSettings
			{
				SuggestedStartLocation = PickerLocationId.DocumentsLibrary,
				FileTypeFilter = new List<string> { ".txt" }
			};

			StorageFile storageFile = await dialogService.PickSingleFileAsync(settings);
			if (storageFile != null)
			{
				SingleFilePath = storageFile.Path;
			}
		}
Esempio n. 4
0
        private async void PickMultipleFiles()
        {
            var settings = new FileOpenPickerSettings
            {
                SuggestedStartLocation = PickerLocationId.DocumentsLibrary,
                FileTypeFilter         = new List <string> {
                    ".txt"
                }
            };

            IReadOnlyList <StorageFile> storageFiles = await dialogService.PickMultipleFilesAsync(settings);

            if (storageFiles.Any())
            {
                MultipleFilesPath = string.Join(";", storageFiles.Select(storageFile => storageFile.Path));
            }
        }
Esempio n. 5
0
        private async void PickSingleFile()
        {
            var settings = new FileOpenPickerSettings
            {
                SuggestedStartLocation = PickerLocationId.DocumentsLibrary,
                FileTypeFilter         = new List <string> {
                    ".txt"
                }
            };

            StorageFile storageFile = await dialogService.PickSingleFileAsync(settings);

            if (storageFile != null)
            {
                SingleFilePath = storageFile.Path;
            }
        }
Esempio n. 6
0
 public IAsyncOperation <StorageFile> PickSingleFileAsync(FileOpenPickerSettings settings)
 {
     throw new NotImplementedException();
 }
Esempio n. 7
0
 public IAsyncOperation <IReadOnlyList <StorageFile> > PickMultipleFilesAsync(FileOpenPickerSettings settings)
 {
     throw new NotImplementedException();
 }