1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-30 05:34:06 +02:00

Change update progress form to show kB instead of MB

This commit is contained in:
chylex 2017-01-26 06:39:46 +01:00
parent cf7d903932
commit 66699ce9df

View File

@ -9,7 +9,7 @@
namespace TweetDck.Updates{ namespace TweetDck.Updates{
sealed partial class FormUpdateDownload : Form{ sealed partial class FormUpdateDownload : Form{
private const double BytesToMB = 1024.0*1024.0; private const double BytesToKB = 1024.0;
public string InstallerPath{ public string InstallerPath{
get{ get{
@ -69,7 +69,7 @@ private void webClient_DownloadProgressChanged(object sender, DownloadProgressCh
progressDownload.SetValueInstant(1000); progressDownload.SetValueInstant(1000);
} }
labelStatus.Text = (e.BytesReceived/BytesToMB).ToString("0.0", CultureInfo.CurrentCulture)+" MB"; labelStatus.Text = (e.BytesReceived/BytesToKB).ToString("0.0", CultureInfo.CurrentCulture)+" kB";
} }
else{ else{
if (progressDownload.Style != ProgressBarStyle.Continuous){ if (progressDownload.Style != ProgressBarStyle.Continuous){
@ -77,7 +77,7 @@ private void webClient_DownloadProgressChanged(object sender, DownloadProgressCh
} }
progressDownload.SetValueInstant(e.ProgressPercentage*10); progressDownload.SetValueInstant(e.ProgressPercentage*10);
labelStatus.Text = (e.BytesReceived/BytesToMB).ToString("0.0", CultureInfo.CurrentCulture)+" / "+(e.TotalBytesToReceive/BytesToMB).ToString("0.0", CultureInfo.CurrentCulture)+" MB"; labelStatus.Text = (e.BytesReceived/BytesToKB).ToString("0.0", CultureInfo.CurrentCulture)+" / "+(e.TotalBytesToReceive/BytesToKB).ToString("0.0", CultureInfo.CurrentCulture)+" kB";
} }
}); });
} }