private bool WriteMainGameFile(string fileContents)
{
try
{
StreamWriter fileOutput = new StreamWriter(GAME_FILE_NAME, false, Encoding.Default);
fileOutput.Write(fileContents);
fileOutput.Close();
return true;
}
catch (UnauthorizedAccessException e)
{
Factory.GUIController.ShowMessage("Unable to save the game file. Make sure the file " + GAME_FILE_NAME + " is not set as read-only. The error was: " + e.Message, MessageBoxIcon.Warning);
return false;
}
}