async Task processImageFiles(StorageFolder folder) { var fileQuery = await folder.GetFilesAsync(); foreach (var file in fileQuery) { ImageItem item = new ImageItem(file); await item.LoadImageFromDisk(); m_images.Add(item); } }
public async Task <StorageFile> DownloadImageAsync(Uri fileUri, StorageFolder folder, string fileName) { var file = await folder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting); var downloader = new BackgroundDownloader(); var download = downloader.CreateDownload(fileUri, file); var res = await download.StartAsync(); ImageItem item = new ImageItem(file); await item.LoadImageFromDisk(); m_images.Add(item); return(file); }
public async Task<StorageFile> DownloadImageAsync(Uri fileUri, StorageFolder folder, string fileName) { var file = await folder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting); var downloader = new BackgroundDownloader(); var download = downloader.CreateDownload(fileUri, file); var res = await download.StartAsync(); ImageItem item = new ImageItem(file); await item.LoadImageFromDisk(); m_images.Add(item); return file; }