private void Completed(object sender, AsyncCompletedEventArgs e) { sw.Reset(); if (e.Cancelled == true) { MessageBox.Show("Download has been canceled."); } else { Debug.WriteLine("Download completed!"); DownloadEnd?.Invoke(this, EventArgs.Empty); } }
public static void OnDownloadEnd(object sender, DownloadEventArgs ev) => DownloadEnd?.Invoke(sender, ev);
private void OnDownloadEnd(DownloadEndEventArgs e) { try { DownloadEnd?.Invoke(this, e); } catch { } }