mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-11 11:34:07 +02:00
Change update progress form to show kB instead of MB
This commit is contained in:
parent
cf7d903932
commit
66699ce9df
@ -9,7 +9,7 @@
|
||||
|
||||
namespace TweetDck.Updates{
|
||||
sealed partial class FormUpdateDownload : Form{
|
||||
private const double BytesToMB = 1024.0*1024.0;
|
||||
private const double BytesToKB = 1024.0;
|
||||
|
||||
public string InstallerPath{
|
||||
get{
|
||||
@ -69,7 +69,7 @@ private void webClient_DownloadProgressChanged(object sender, DownloadProgressCh
|
||||
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{
|
||||
if (progressDownload.Style != ProgressBarStyle.Continuous){
|
||||
@ -77,7 +77,7 @@ private void webClient_DownloadProgressChanged(object sender, DownloadProgressCh
|
||||
}
|
||||
|
||||
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";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user