From 91c6b3bf1c709cc392d52391407a70feabc9214b Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 25 Apr 2017 12:24:44 -0400 Subject: fix Appscape install bugs --- ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs') 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(); }); -- cgit v1.2.3