Example #1
0
        public void Download(IGameFileDataSourceAdapter adapter, string dlFilename)
        {
            IdGamesDataAdapater adapater = adapter as IdGamesDataAdapater;

            if (adapater != null)
            {
                this.m_webClient = new WebClient();
                this.m_webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(this.client_DownloadProgressChanged);
                this.m_webClient.DownloadFileCompleted   += new AsyncCompletedEventHandler(this.client_DownloadFileCompleted);
                this.m_webClient.DownloadFileAsync(new Uri(adapater.MirrorUrl + this.dir + this.filename), dlFilename, this.id);
            }
        }
        public void Download(IGameFileDataSourceAdapter adapter, string dlFilename)
        {
            IdGamesDataAdapater dataAdapter = adapter as IdGamesDataAdapater;

            if (dataAdapter != null)
            {
                m_webClient = new WebClient();
                m_webClient.DownloadProgressChanged += client_DownloadProgressChanged;
                m_webClient.DownloadFileCompleted   += client_DownloadFileCompleted;
                m_webClient.DownloadFileAsync(new Uri(dataAdapter.MirrorUrl + dir + filename), dlFilename, id);
            }
        }