protected void UpdateStatistics(string key, S3ProgressEventArgs args) { lock (statistics) { TransferStatistic statistic; statistics.TryGetValue(key, out statistic); if (statistic != null) { statistic.BytesTotal = args.BytesTotal; statistic.BytesTransferred = args.BytesTransferred; statistic.ProgressPercentage = args.ProgressPercentage; if (statistic.ProgressPercentage < 100 && unfinishedStatistics.IndexOf(statistic) == -1) { unfinishedStatistics.Add(statistic); finishedStatistics.Remove(statistic); } if (statistic.ProgressPercentage >= 100 && finishedStatistics.IndexOf(statistic) == -1) { finishedStatistics.Add(statistic); unfinishedStatistics.Remove(statistic); } } } }
private static void ServiceGetObjectProgress(object sender, S3ProgressEventArgs e) { _notification.SetMessage("Downloading updates - " + Math.Round((Convert.ToDouble(e.BytesTransferred) / Convert.ToDouble(e.BytesTotal)) * 100, 0) + @"%"); Application.DoEvents(); }
private void ServiceGetObjectProgress(object sender, S3ProgressEventArgs e) { ModifySyncStatus("Downloaded", e.BytesTransferred, e.BytesTotal, e.Key); }
private void ServiceGetObjectProgress(object sender, S3ProgressEventArgs e) { LblStatus.Text = "Downloading updates - " + Math.Round((Convert.ToDouble(e.BytesTransferred) / Convert.ToDouble(e.BytesTotal)) * 100, 0) + @"%"; Application.DoEvents(); }