Пример #1
0
        /// <summary>
        /// Downloads images to a directory.
        /// </summary>
        /// <param name="directory">A directory to download the images to.</param>
        /// <param name="uris">List of image uris.</param>
        public static void DownloadImages(string directory, List <Uri> uris)
        {
            ProgressBar module     = new ProgressBar(20);
            var         downloader = new ImageDownloader(directory);

            var stopwatch = new Stopwatch();

            stopwatch.Start();

            downloader.DownloadImagesAsync(uris, module);

            stopwatch.Stop();

            Console.WriteLine($"\nDone! Elapsed time: {stopwatch.ElapsedMilliseconds}\n");
        }