public bool LoadGameFromDisk(string gameToLoad)
{
try
{
bool success = _tasks.LoadGameFromDisk(gameToLoad, true);
AGS.Types.Game game = Factory.AGSEditor.CurrentGame;
if (((game.SavedXmlVersion != null) &&
(game.SavedXmlVersion != AGSEditor.LATEST_XML_VERSION))
||
((game.SavedXmlVersionIndex != null) &&
(game.SavedXmlVersionIndex != AGSEditor.LATEST_XML_VERSION_INDEX)))
{
Factory.GUIController.ShowMessage("This game was last saved with " +
((game.SavedXmlEditorVersion == null) ? "an older version" : ("version " + game.SavedXmlEditorVersion))
+ " of AGS. If you save it now, the game will be upgraded and previous versions of AGS will be unable to open it.", MessageBoxIcon.Information);
game.WorkspaceState.RequiresRebuild = true;
}
return(success);
}
catch (Exception ex)
{
ReportTaskException("An error occurred whilst trying to load your game.", ex);
return(false);
}
}