33 lines
920 B
C#
33 lines
920 B
C#
using System;
|
|
using System.Diagnostics;
|
|
|
|
namespace XboxLauncher
|
|
{
|
|
class Helpers
|
|
{
|
|
public static void OutputText(string text, ConsoleColor color = ConsoleColor.Gray)
|
|
{
|
|
if (Debugger.IsAttached)
|
|
{
|
|
Debug.Write(text);
|
|
}
|
|
|
|
Console.ForegroundColor = color;
|
|
Console.Write(text);
|
|
}
|
|
|
|
public static string GetUsageMessage()
|
|
{
|
|
string usage = "";
|
|
usage += "Usage:";
|
|
usage += "\nXboxLauncher.exe -exeFilePath=[applicationExeFilePath] -packageName=[applicationPackageName] -sdkType=[GDK|XDK] [applicationArgs]";
|
|
return usage;
|
|
}
|
|
|
|
public static void Exit(ErrorCodes code, string message = "")
|
|
{
|
|
OutputText(code.GetMessage(message), ConsoleColor.Red);
|
|
System.Environment.Exit(code.GetErrorCode());
|
|
}
|
|
}
|
|
}
|