static void TaskForm_Cancelled(object sender, CancelEventArgs e) { if (IsDownloading) { Web.CancelAsync(); } }