private void downloadProgressChanged(object sender, DownloadProgressChangeEventArgs e) { if (JeremieLauncher.instance.index == index) { Version tempVer = new Version(NewVersion.VersionMajor, NewVersion.VersionMinor, NewVersion.VersionPatch, NewVersion.VersionBuild, true); JeremieLauncher.instance.RichPresence.State = $"Downloading {GameName} {tempVer}"; //DateTimeOffset dto = new DateTimeOffset(DateTime.UtcNow); //dto.AddSeconds(e.getTimeRemainingLong()); //JeremieLauncher.instance.RichPresence.Timestamps.EndUnixMilliseconds = (ulong) startdownloadtime + (ulong)(dto.ToUnixTimeMilliseconds()-startdownloadtime); //JeremieLauncher.instance.client.SetPresence(JeremieLauncher.instance.RichPresence); } lblStatus.Text = "Progress: " + e.ConvertDownloadedBytesToString() + "/" + e.ConvertTotalBytesToString() + " (" + e.ProgressPercentage.ToString() + "%) " + e.ConvertBytesToString(e.DownloadSpeedBytes) + "/s " + e.getTimeRemaining(); pbProgress.Value = e.ProgressPercentage; }
private void setupProgressChanged(object sender, DownloadProgressChangeEventArgs e) { Game game = games[index]; game.lblStatus.Text = "Progress: " + e.ConvertDownloadedBytesToString() + "/" + e.ConvertTotalBytesToString() + " (" + e.ProgressPercentage.ToString() + "%) " + e.ConvertBytesToString(e.DownloadSpeedBytes) + "/s " + e.getTimeRemaining(); game.pbProgress.Value = (int)e.ProgressPercentage; }