internal bool NotifyDidReceiveDataOfLength(WebDownload download, uint length) { if (DidCancel) { download.cancel(); return(false); } else { DownloadReceiveData(this, new DownloadReceiveDataEventArgs(length)); return(true); } }
private void DownloadForm_FormClosed(object sender, FormClosingEventArgs e) { if (System.IO.File.Exists(FileForDownloading)) { if (MessageBox.Show("Are you sure you want to cancel this download?", "Downloader", MessageBoxButtons.YesNoCancel) == System.Windows.Forms.DialogResult.Yes) { download.cancel(); e.Cancel = false; this.Close(); } else { e.Cancel = true; } } }
internal bool NotifyDidReceiveDataOfLength(WebDownload download, uint length) { if (DidCancel) { download.cancel(); return false; } else { DownloadReceiveData(this, new DownloadReceiveDataEventArgs(length)); return true; } }