static int Main(string[] args) { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainForm f = new MainForm(args); Application.Run(f); // ErrorMessage can be set when a startup script fails. if (f.ErrorMessage != null) { File.WriteAllText("errors.txt", f.ErrorMessage); return 1; } } catch (Exception err) { string Msg = err.Message; if (err.InnerException != null) Msg += "\r\n" + err.InnerException.Message; Msg += "\r\n" + err.StackTrace; MessageBox.Show(Msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return 0; }
public Renderer(MainForm mainForm, RenderMode renderMode) { this.mainForm = mainForm; this.renderMode = renderMode; this.renderImage = null; }
public static void Main(string[] args) { Gtk.Application.Init(); MainForm win = new MainForm(args); win.MainWidget.ShowAll(); Gtk.Application.Run(); }