recrownedgtk/RecrownedAthenaeum.ConsoleTools/Tools.cs

35 lines
1.1 KiB
C#

using RecrownedAthenaeum.Tools.CommandProcessor;
using RecrownedAthenaeum.Tools.TextureAtlasTools;
using System;
using System.Reflection;
using System.Text;
namespace RecrownedAthenaeum.Tools
{
internal class Tools
{
static void Main(string[] args)
{
CommandEngine ce = new CommandEngine();
ConsoleUtilities.WriteWrappedLine("Recrowned Athenaeum Console Tools version " + Assembly.GetExecutingAssembly().GetName().Version.ToString());
ConsoleUtilities.WriteWrappedLine("Type \"help\" for help.");
ce.commands.Add(new HelpCommand(ce));
ce.commands.Add(new TexturePackerCommand());
ce.commands.Add(new StopCommand(ce));
ce.commands.Add(new TestCommand());
if (args != null)
{
ConsoleUtilities.WriteWrappedLine("Executing as one time use.");
StringBuilder sb = new StringBuilder();
for (int i = 0; i < args.Length; i++) sb.Append(args[i] + ' ');
ce.Process(sb.ToString().Trim());
} else
{
ce.Run();
}
}
}
}