Execute() public method

public Execute ( ) : EngineResult
return EngineResult
Beispiel #1
0
 public static int Main(string[] args)
 {
     var engineSettings = new EngineSettings();
     engineSettings.ConfigureFromArgs(args);
     int retVal = engineSettings.Execute();
     LogManager.Configuration = null; // required for mono release to flush possible targets
     return retVal;
 }
Beispiel #2
0
        private void ExecuteRenderer()
        {
            var engineCfg = GetRenderSettings();
            try {
                VFS.Reset();
                var engine = new EngineSettings();
                engine.ConfigureFromSettings(engineCfg);
                engine.Execute();

                // 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.");
            }
            catch (Exception exc) {
                AskBugReport();
            }
        }
Beispiel #3
0
		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.");
					AskBugReport(null);
					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.");
					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);
			}
		}