Esempio n. 1
0
 private void DownloadForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (_transfer.IsBusy)
     {
         _transfer.CancelAsync();
     }
     if (ExtractDownload.IsBusy)
     {
         ExtractDownload.CancelAsync();
     }
     if (!File.Exists(_appPath))
     {
         Application.Exit();
     }
 }
Esempio n. 2
0
 private void CancelBtn_Click(object sender, EventArgs e)
 {
     try
     {
         if (_transfer.IsBusy)
         {
             _transfer.CancelAsync();
         }
         if (Directory.Exists(UpdateDir))
         {
             Directory.Delete(UpdateDir, true);
         }
     }
     catch (Exception ex)
     {
         Log.Write(ex);
     }
     Application.Exit();
 }