public void TestGame(bool withDebugger)
{
string parameter = string.Empty;
if (withDebugger)
{
parameter = "--enabledebugger " + Factory.AGSEditor.Debugger.InstanceIdentifier;
}
else if (Factory.AGSEditor.Preferences.TestGameStyle == TestGameWindowStyle.Windowed)
{
parameter = "-windowed";
}
else if (Factory.AGSEditor.Preferences.TestGameStyle == TestGameWindowStyle.FullScreen)
{
parameter = "-fullscreen";
}
_runningGameWithDebugger = withDebugger;
RunEXEFile(Path.Combine(AGSEditor.DEBUG_OUTPUT_DIRECTORY, Factory.AGSEditor.BaseGameFileName + ".exe"), parameter, true);
if (withDebugger)
{
Factory.AGSEditor.Debugger.InitializeEngine(Factory.AGSEditor.CurrentGame, Factory.GUIController.TopLevelWindowHandle);
}
}