Downloading packages now shows progress to the user. Utility app no longer immediately exits after downloading packages.

This commit is contained in:
Matthew Bowra-Dean
2010-11-15 23:06:44 +13:00
committed by Paul Chote
parent 5904563653
commit 63d54952d0
6 changed files with 149 additions and 28 deletions

View File

@@ -13,6 +13,8 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using System.IO.Pipes;
using System.IO;
namespace OpenRA.Launcher
{
@@ -113,7 +115,13 @@ namespace OpenRA.Launcher
private void InstallMod(object sender, EventArgs e)
{
if (installModDialog.ShowDialog() != DialogResult.OK) return;
using (var response = UtilityProgram.CallWithAdmin("--install-mod", installModDialog.FileName))
var p = UtilityProgram.CallWithAdmin("--install-mod", installModDialog.FileName);
var pipe = new NamedPipeClientStream(".", "OpenRA.Utility", PipeDirection.In);
pipe.Connect();
p.WaitForExit();
using (var response = new StreamReader(pipe))
{
string s = response.ReadToEnd();
}