public void OnStatusChanged(object sender, DownloadStatusEventArgs e) { if (!this.Dispatcher.CheckAccess()) { this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new DownloadStatusChangedEventHandler((s, e2) => { OnStatusChanged(s, e2); }), sender, e); return; } switch (e.Code) { case DMODownloadStatusCode.GETTING_GUILD: { LoadProgressStatus.Text = LanguageManager.Model.CommSearchingGuild; break; } case DMODownloadStatusCode.GETTING_TAMER: { LoadProgressStatus.Text = string.Format(LanguageManager.Model.CommGettingTamer, e.Info); break; } } LoadProgressBar.Maximum = e.MaxProgress; LoadProgressBar.Value = e.Progress; }
public void OnStatusChanged(object sender, DownloadStatusEventArgs e) { if (!this.Dispatcher.CheckAccess()) { this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new DownloadStatusChangedEventHandler((s, e2) => { OnStatusChanged(s, e2); }), sender, e); return; } loader.Maximum = e.MaxProgress; loader.Value = e.Progress; }
private void ThreadWatcher_DownloadStatus(ThreadWatcher watcher, DownloadStatusEventArgs args) { WatcherExtraData extraData = (WatcherExtraData)watcher.Tag; bool isInitialPageDownload = false; bool isFirstImageUpdate = false; if (args.DownloadType == DownloadType.Page) { if (!extraData.HasDownloadedPage) { extraData.HasDownloadedPage = true; isInitialPageDownload = true; } extraData.PreviousDownloadWasPage = true; } if (args.DownloadType == DownloadType.Image && extraData.PreviousDownloadWasPage) { extraData.LastImageOn = DateTime.Now; extraData.PreviousDownloadWasPage = false; isFirstImageUpdate = true; } BeginInvoke(() => { SetDownloadStatus(watcher, args.DownloadType, args.CompleteCount, args.TotalCount); if (isInitialPageDownload) { DisplayDescription(watcher); _saveThreadList = true; } if (isFirstImageUpdate) { DisplayLastImageOn(watcher); _saveThreadList = true; } SetupWaitTimer(); }); }
public void c_DownloadingStatus(object sender, DownloadStatusEventArgs args) { // info.downloadPercentage = args.percentDownloaded.ToString(); }
void req_FilePartDownloaded(object sender, DownloadStatusEventArgs e) { bwDownload.ReportProgress(e.DownloadStatus * 100 / e.FileLength); }
static void c_DownloadingStatus(object sender, DownloadStatusEventArgs args) { Console.WriteLine($"DownloadPercentage: {args.percentDownloaded}"); }
public void OnStatusChanged(object sender, DownloadStatusEventArgs e) { Object.OnStatusChanged(sender, e); }