Skip to content

Commit 933bb22

Browse files
committed
Small fixes
1 parent 5eaa0e4 commit 933bb22

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

SteamInstaller/Program.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.IO.Compression;
55
using System.Net;
66
using System.Reflection;
7-
using System.Text;
87
using System.Text.RegularExpressions;
98

109
namespace SteamInstaller
@@ -19,8 +18,6 @@ class Program
1918
private const string FOLDERNAME = "SteamCMD";
2019
private const string EXE = "steamcmd.exe";
2120

22-
private static string DataStream = "";
23-
2421
/// <summary>
2522
/// Constructor of SteamInstaller
2623
/// </summary>
@@ -73,8 +70,6 @@ static void Main(string[] args)
7370
compiler.BeginOutputReadLine();
7471

7572
compiler.WaitForExit();
76-
//var bytes = Encoding.ASCII.GetBytes(DataStream);
77-
//Console.WriteLine(Encoding.UTF8.GetString(bytes));
7873

7974
WriteColor($"[//] Application {EXE} finished with code {compiler.ExitCode}", ConsoleColor.DarkGreen);
8075
WriteColor(@"[//---------------------------------------------------------------]", ConsoleColor.DarkGreen);
@@ -111,10 +106,17 @@ static void WriteColor(string message, ConsoleColor color)
111106
Console.WriteLine();
112107
}
113108

109+
/// <summary>
110+
/// Write console output to the screen
111+
/// </summary>
112+
/// <param name="sender"></param>
113+
/// <param name="e">Eventinformation from the console</param>
114114
private static void Compiler_OutputDataReceived(object sender, DataReceivedEventArgs e)
115115
{
116-
WriteColor($"[//] {e.Data}", ConsoleColor.Cyan);
117-
//DataStream += e.Data + Environment.NewLine;
116+
if (!string.IsNullOrEmpty(e.Data))
117+
{
118+
WriteColor($"[//] {e.Data}", ConsoleColor.Cyan);
119+
}
118120
}
119121

120122
/// <summary>

0 commit comments

Comments
 (0)