void start() { Uri source = new Uri(comboBox1.Text); file = source.ToString(); button1.Text = "Stop"; wc.OpenRead(source); path = comboBox2.Text; wc.DownloadProgressChanged += (s, z) => { label3.Text = $"Downloaded as MB: {((float)z.BytesReceived / 1048576).ToString("#.#")}"; label4.Text = $"Downloaded {z.ProgressPercentage}%"; progressBar1.Value = z.ProgressPercentage; timer1.Start(); }; wc.DownloadFileAsync(source, path + Path.GetFileName(source.ToString())); button3.Visible = true; } void stop() { wc.CancelAsync(); button1.Text = "Start"; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)