title: Change Backgroundworker Progress from other function
body: <p>I need to change my backgroundworker progress outside the DoWork Event is this possible ?</p>
  
  <p>My code</p>
  
  <pre><code>private void progress_changed(string fileName, DownloadProgressChangedEventArgs e)
  {
      progress = e.ProgressPercentage;
      Filename = fileName;
      // change the progress here
  }
  
  private void worker_DoWork(string fileName)
  {
      WebClient client = new WebClient();
      client.DownloadProgressChanged += (obj, e) =&gt; progress_changed(fileName, e);
      client.DownloadFileCompleted += new AsyncCompletedEventHandler(progress_complete);
      client.DownloadFileAsync(new Uri(Link), Savepath);
  }
  
  private void worker_ProgressChanged(object sender, ProgressChangedEventArgs e)
  {
      mainForm.dlist.Items[mainForm.dlist.Items.IndexOfKey(Filename)].SubItems[2].Text = progress.ToString() + "%";
      mainForm.dlist.Items[mainForm.dlist.Items.IndexOfKey(Filename)].SubItems[3].Text = "Downloading";
  }
  </code></pre>