private void UpdateWorkerThreadDoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
try
{
DoDownloadAndSaveAllFiles(mFoundFiles, mDownloadedFiles);
}
catch (InvalidOperationException ioe)
{
if (_currentFile != null && !updateWorkerThread.CancellationPending)
{
MessageBox.Show(@"Download for the following file has failed:
" +
_currentFile.ServerFile + @"
Exception Info:
" + ioe);
}
return;
}
if (updateWorkerThread.CancellationPending)
{
e.Cancel = true;
return;
}
try
{
//Copy files
foreach (var fileData in mDownloadedFiles)
{
File.Copy(fileData.DiskFile, fileData.ProjectFile, true);
}
}
catch (Exception exception)
{
MessageBox.Show(@"Copy failed.
Exception Info:
" + exception);
return;
}
}