Exemple #1
0
        /// <summary>
        /// Attempt to download the file.  If the download fails, delete the
        /// bad file.  Send a status message that download failed for the file.
        /// Then move to next file by waking up the event wait.
        /// </summary>
        /// <param name="filename">File name to download.</param>
        private void DownloadData(string filename)
        {
            // Download the data
            if (!_adcpConn.DownloadData(DownloadDirectory, filename, ParseDownloadedData))
            {
                // If the download failed
                // remove the file and add it to the list of failed downloads
                // so they can try to be redownloaded
                DownloadFail(filename);

                // Move to the next file
                _downloadComplete = true;
                _eventWaitDownload.Set();
            }
        }