static void Main(string[] args) { try { Finder.Find(); for (int i = 0; i < args.Length; i++) { var ext = Path.GetExtension(args[i]); if (!String.IsNullOrEmpty(ext) && ext.Trim('.').ToLower() == "fx") { IsDump = true; var exit = CompileFX(args[i]); if (exit != null) { Errors.Add(exit); } } } } catch { Finder.NeedsToRefind = true; } if (IsDump) { if (Errors.Count > 0) { Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (var errorCon = new ErrorConsole(Errors)) { Application.Run(errorCon); } } else { return; } } else { Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (var console = new EffexConsole()) { if (!Finder.NeedsToRefind) { console.DisableInstall(); } Application.Run(console); } } }
private void ManualCompile(object sender, System.EventArgs e) { using (var select = new OpenFileDialog()) { if (select.ShowDialog() == DialogResult.OK) { var exit = Program.CompileFX(select.FileName); if (exit != null) { var errors = new List <ErrorPair>(); errors.Add(exit); var console = new ErrorConsole(errors); console.Show(); } } } }