public void UpdateProgressBars(object sender, FileDownloadUpdateArgs args) { mainView.Dispatcher.Invoke(() => { double percentDone = (args.CurrentFileDownloadedSize / args.CurrentFileSize) * 100.0; mainView.downloadSingleProgressBar.Value = percentDone; mainView.downloadAllProgressBar.Value = ((singleFilesize + args.CurrentFileDownloadedSize) / filesSize) * 100.0; if (percentDone == 100.0) { singleFilesize += (long)args.CurrentFileSize; //TODO FIX } }); }
protected void OnFileDownloadUpdate(FileDownloadUpdateArgs args) { FileDownloadUpdate?.Invoke(this, args); }