diff options
| author | Michael <[email protected]> | 2017-04-25 12:24:44 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-04-25 12:24:44 -0400 |
| commit | 91c6b3bf1c709cc392d52391407a70feabc9214b (patch) | |
| tree | f510ce3ac6963c51c125359758346813fbc71ee3 /ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs | |
| parent | cd29d582d90e0a31a9b21661a813c789b82468cc (diff) | |
| download | shiftos_thereturn-91c6b3bf1c709cc392d52391407a70feabc9214b.tar.gz shiftos_thereturn-91c6b3bf1c709cc392d52391407a70feabc9214b.tar.bz2 shiftos_thereturn-91c6b3bf1c709cc392d52391407a70feabc9214b.zip | |
fix Appscape install bugs
Diffstat (limited to 'ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs')
| -rw-r--r-- | ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs b/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs index 84783e5..691f622 100644 --- a/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs +++ b/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs @@ -336,22 +336,28 @@ namespace ShiftOS.WinForms.ShiftnetSites int i = 0; while (i <= Size) { - SetProgress((i / Size) * 100); - i++; - Thread.Sleep(100); + double progress = ((i / Size) * 100); + + SetProgress((int)progress); + + i += Applications.DownloadManager.GetDownloadSpeed(); + Thread.Sleep(1000); } SetProgress(0); SetStatus("Installing..."); i = 0; while (i <= Size) { - SetProgress((i / Size) * 100); - i++; - Thread.Sleep(50); + double progress = ((i / Size) * 100); + + SetProgress((int)progress); + + i+=1024; + Thread.Sleep(1000); } - Shiftorium.Buy(ShiftoriumId, 0); Desktop.InvokeOnWorkerThread(() => { + Shiftorium.Buy(ShiftoriumId, 0); Infobox.Show("Install complete!", "The installation of " + Name + " has completed."); SaveSystem.SaveGame(); }); |
