Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7726047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:06:46+00:00 2026-06-01T05:06:46+00:00

I have another question :(. I’m trying to download multiple files for my application.

  • 0

I have another question :(.
I’m trying to download multiple files for my application.

My question is: What do I have to do to check if the first download is done and then continue to the second download and so on?

This is my code atm:

        private void DownloadBukkit()
        {
            MySingleton.Instance.FirstStartProgress = "Downloading Bukkit.jar... Please stand by...";
            webClient.DownloadFileAsync(new Uri(MySingleton.Instance.BukkitDownloadLink), Jar_Location);
            webClient.DownloadProgressChanged += backgroundWorker1_ProgressChanged;
            webClient.DownloadFileCompleted += (webClient_DownloadFileCompleted);
        }

        private void DownloadDll()
        {
            if (!webClient.IsBusy)
            {
                MySingleton.Instance.FirstStartProgress = "Downloading HtmlAgilityPack.dll... Please stand by...";
                webClient2.DownloadFileAsync(new Uri(Dll_HtmlAgilityPackUrl), Dll_HtmlAgilityPackLocation);
                webClient2.DownloadProgressChanged += backgroundWorker1_ProgressChanged;
                webClient2.DownloadFileCompleted += (webClient2_DownloadFileCompleted);
            }
        }

    void webClient_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
    {
            DownloadDll();
    }


    void webClient2_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
    {
         Invoke((MethodInvoker)
               Close);
    }

    private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            Invoke((MethodInvoker)
                   delegate
                       {
                           labelProgress.Text = MySingleton.Instance.FirstStartProgress;
                           progressBar1.Value = e.ProgressPercentage;
                       });
        }

I have checked this link: DownloadFileAsync multiple files using webclient but I didn’t really understand how to implant this :(. (I’m quite new to C#)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:06:48+00:00Added an answer on June 1, 2026 at 5:06 am

    The DownloadFileCompleted event is your signal to know that you are finished downloading the file.

    From MSDN:

    This event is raised each time an asynchronous file download operation
    completes.

    It’s not clear from your code, where and how webClient and webClient2 are declared but essentially, you can start your second download when the first DownloadFileCompleted event is fired. Note, however, that you can perform the download of 2 different files concurrently provided you use 2 separate instances of WebClient.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have another question for the masses out there regarding trying to input values
I have another question. Say i have a link, How can i check if
I have another question about restoring application state, on the iPhone. Simple data (like
Okay, so I have another question on a prolog homework problem I am struggling
i have another (probably unanswered) question about map views. I have a map view
I have recently posted another question which straight away users pointed me in the
Another question related to this one . I have a List<SortableObjects> that is the
This question is kind of related to another question but I have a specific
Per a great answer from another question I have begun mounting global resources (css/js/images)
As described in another question , I have a set of Model objects and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.