private bool ExecuteRenderer(string inputFilename) { var engineCfg = GetRenderSettings(inputFilename); bool success = false; try { VFS.Reset(); var engine = new EngineSettings(); engine.ConfigureFromSettings(engineCfg); var result = engine.Execute(); switch (result) { case EngineResult.Exception: Log("\r\nUnknown exception.\r\n"); AskBugReport(null); break; case EngineResult.RenderedOk: Log("\r\nSpecified action(s) completed.\r\n------------------------------\r\n"); // +" Please send an email to [email protected] with your map as an attachment."); success = true; break; case EngineResult.LoadTheaterFailed: Log("\r\nTheater loading failed. Please make sure the mix directory is correct and that the required expansion packs are installed " + "if they are required for the map you want to render.\r\n"); AskBugReport(null); break; case EngineResult.LoadRulesFailed: Log("\r\nRules loading failed. Please make sure the mix directory is correct and that the required expansion packs are installed " + "if they are required for the map you want to render.\r\n"); AskBugReport(null); break; } } catch (Exception exc) { AskBugReport(exc); } return(success); }
private void ExecuteRenderer() { var engineCfg = GetRenderSettings(); try { VFS.Reset(); var engine = new EngineSettings(); engine.ConfigureFromSettings(engineCfg); var result = engine.Execute(); switch (result) { case EngineResult.Exception: Log("\r\nUnknown exception."); AskBugReport(null); break; case EngineResult.RenderedOk: // indicates EOF Log("\r\nYour map has been rendered. If your image did not appear, something went wrong."); // +" Please send an email to [email protected] with your map as an attachment."); break; case EngineResult.LoadTheaterFailed: Log("\r\nTheater loading failed. Please make sure the mix directory is correct and that the required expansion packs are installed " + "if they are required for the map you want to render."); AskBugReport(null); break; case EngineResult.LoadRulesFailed: Log("\r\nRules loading failed. Please make sure the mix directory is correct and that the required expansion packs are installed " + "if they are required for the map you want to render."); AskBugReport(null); break; } } catch (Exception exc) { AskBugReport(exc); } }