Exemplo n.º 1
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);
            }
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
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;
        }
Exemplo n.º 4
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);
     }
 }