public static void Main(string[] args) { _progressForm = null; try { // Optimize XmlSerialization by generating XmlSerializers assembly Utilities.SGenThisAssembly(); _codeGenApp = new CodeGenApp(); _codeGenApp.ParseArguments(args); if (_codeGenApp.Init()) { if (Environment.GetEnvironmentVariable("SharpDXBuildNoWindow") == null) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); _progressForm = new ProgressForm(); Logger.ProgressReport = _progressForm; _progressForm.Show(); var runningThread = new Thread(RunAsync) { IsBackground = true }; runningThread.Start(); Application.Run(_progressForm); } else { RunAsync(); } } else { Logger.Message("Latest code generation is up to date. No need to run code generation"); } } catch (Exception ex) { Logger.Fatal("Unexpected exception", ex); } Environment.Exit(0); }
public static void Main(string[] args) { _progressForm = null; try { // Optimize XmlSerialization by generating XmlSerializers assembly Utilities.SGenThisAssembly(); _codeGenApp = new CodeGenApp(); _codeGenApp.ParseArguments(args); if(_codeGenApp.Init()) { if(Environment.GetEnvironmentVariable("SharpDXBuildNoWindow") == null) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); _progressForm = new ProgressForm(); Logger.ProgressReport = _progressForm; _progressForm.Show(); var runningThread = new Thread(RunAsync) {IsBackground = true}; runningThread.Start(); Application.Run(_progressForm); } else { RunAsync(); } } else { Logger.Message("Latest code generation is up to date. No need to run code generation"); } } catch(Exception ex) { Logger.Fatal("Unexpected exception", ex); } Environment.Exit(0); }