void scan_ScanProgressChanged(object sender, ScanProgressChangedEventArgs e) { if (progressBar1.InvokeRequired) { SafeCallProgressDelegate d = new SafeCallProgressDelegate((x) => { progressBar1.Value = x; }); int value = e.Progress; progressBar1.Invoke(d, new object[] { value }); } else { progressBar1.Value = e.Progress; } }
void scan_ScanProgressChanged(object sender, ScanProgressChangedEventArgs e) { if (this.InvokeRequired) { Progress progress = new Progress(scan_ScanProgressChanged); this.Invoke(progress, new object[] { sender, e }); } else { if (e.Progress > 100) { e.Progress = 100; } ProgressBar.Value = e.Progress; if (e.Progress == 100) { ScanTimeStopwatch.Stop(); } } }
public void Scan_ProgressChanged_With_Invalid_IP(object sender, ScanProgressChangedEventArgs e) { }
void scan_ScanProgressChanged(object sender, ScanProgressChangedEventArgs e) { scanDialog.progressBar1.Value = e.Progress; }