예제 #1
0
        public void DownloadMedia(string MediaUri, string DownloadPath)
        {
            if (MediaUri.Substring(0, 4).ToLower() == "http")
                _fileDownload = new FileDownloader(MediaUri, DownloadPath);
            else
                _fileDownload = new FileDownloader(string.Format(baseUri, MediaUri.Substring(1,MediaUri.Length -1)), DownloadPath);

            AddDownloadHandlers(_fileDownload);

            _thread = new Thread(_fileDownload.DoWork);
            _thread.Start();
        }
예제 #2
0
 private void RemoveDownloadHandlers(FileDownloader downloader)
 {
     downloader.DownloadFileCompleted -= downloader_DownloadFileCompleted;
     downloader.DownloadProgressChanged -= downloader_DownloadProgressChanged;
 }