Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 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();
     });
 }
Exemplo n.º 4
0
 public void c_DownloadingStatus(object sender, DownloadStatusEventArgs args)
 {
     // info.downloadPercentage = args.percentDownloaded.ToString();
 }
Exemplo n.º 5
0
 void req_FilePartDownloaded(object sender, DownloadStatusEventArgs e)
 {
     bwDownload.ReportProgress(e.DownloadStatus * 100 / e.FileLength);
 }
Exemplo n.º 6
0
 static void c_DownloadingStatus(object sender, DownloadStatusEventArgs args)
 {
     Console.WriteLine($"DownloadPercentage: {args.percentDownloaded}");
 }
Exemplo n.º 7
0
 public void OnStatusChanged(object sender, DownloadStatusEventArgs e)
 {
     Object.OnStatusChanged(sender, e);
 }