public void Initialize()
{
WebClient wc = new WebClient() {Proxy = null};
wc.DownloadProgressChanged += WcOnDownloadProgressChanged;
wc.DownloadDataCompleted += OnDownloadCompleted;
wc.DownloadDataAsync(new Uri(DownloadUrl));
}
public frmUpdate(string version, string url) { InitializeComponent(); pictureInfo.Image = SystemIcons.Information.ToBitmap(); labelInfo.Text = string.Format("An update was found!\nUpdating to version {0}", version); Updater updater = new Updater(url); updater.ProgressChanged += percentage => progressUpdateBar.Value = percentage; updater.Initialize(); }