Example #1
0
        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);
            }
        }
Example #2
0
 public static void OnDownloadEnd(object sender, DownloadEventArgs ev) => DownloadEnd?.Invoke(sender, ev);
Example #3
0
 private void OnDownloadEnd(DownloadEndEventArgs e)
 {
     try { DownloadEnd?.Invoke(this, e); } catch { }
 }