LADXHD/Program.cs

35 lines
908 B
C#
Raw Normal View History

2023-12-14 22:21:22 +00:00
using System;
using System.Windows.Forms;
namespace ProjectZ
{
public static class Program
{
[STAThread]
static void Main(string[] args)
{
var editorMode = false;
var loadFirstSave = false;
foreach (var arg in args)
{
if (arg == "editor")
editorMode = true;
else if (arg == "loadSave")
loadFirstSave = true;
}
try
{
using (var game = new Game1(editorMode, loadFirstSave))
game.Run();
}
catch (Exception exception)
{
2023-12-14 23:00:07 +00:00
System.Windows.Forms.MessageBox.Show(exception.StackTrace, exception.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
2023-12-14 22:21:22 +00:00
throw;
}
}
}
2023-12-14 23:00:07 +00:00
}