From 8cd6d60839b88467d64ac5b4eb59580172deaa56 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 14 Nov 2010 14:10:35 +1300 Subject: [PATCH] Rewrite the download status over the same console line. May break the windows launcher (which doesn't run under osx, so can't test). --- OpenRA.Utility/Command.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenRA.Utility/Command.cs b/OpenRA.Utility/Command.cs index d11df03dc4..d19a894fac 100644 --- a/OpenRA.Utility/Command.cs +++ b/OpenRA.Utility/Command.cs @@ -94,6 +94,7 @@ namespace OpenRA.Utility wc.DownloadProgressChanged += DownloadProgressChanged; wc.DownloadFileCompleted += DownloadFileCompleted; Console.WriteLine("Downloading {0}-packages.zip to {1}", mod, destPath); + Console.WriteLine("Initializing..."); wc.DownloadFileAsync( new Uri(string.Format("http://open-ra.org/get-dependency.php?file={0}-packages", mod)), destFile, @@ -118,6 +119,7 @@ namespace OpenRA.Utility static void DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e) { + Console.SetCursorPosition(0, Console.CursorTop-1); Console.WriteLine("{0}% {1}/{2} bytes", e.ProgressPercentage, e.BytesReceived, e.TotalBytesToReceive); }