Exemple #1
0
        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;
        }
Exemple #2
0
 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);
     }
 }