public static void Main() { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (Form browser = new ExampleBrowser()) { try { if (File.Exists("debug.log")) File.Delete("debug.log"); if (File.Exists("trace.log")) File.Delete("trace.log"); } catch (Exception expt) { MessageBox.Show("Could not access debug.log", expt.ToString()); } Application.Run(browser); } } catch (System.Security.SecurityException e) { MessageBox.Show("The Example Launcher failed to start, due to insufficient permissions. This may happen if you execute the application from a network share.", "OpenTK Example Launcher failed to start.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Trace.WriteLine(e.ToString()); } }
public static void Main(string[] args) { if (args.Length > 0) { LaunchExample(args[0]); } else { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (Form browser = new ExampleBrowser()) { Application.Run(browser); } } catch (System.Security.SecurityException e) { MessageBox.Show("The Example Launcher failed to start, due to insufficient permissions. This may happen if you execute the application from a network share.", "OpenTK Example Launcher failed to start.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Trace.WriteLine(e.ToString()); } } }
public static void Main() { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (Form browser = new ExampleBrowser()) { try { if (File.Exists("debug.log")) { File.Delete("debug.log"); } if (File.Exists("trace.log")) { File.Delete("trace.log"); } } catch (Exception expt) { MessageBox.Show("Could not access debug.log", expt.ToString()); } Application.Run(browser); } } catch (System.Security.SecurityException e) { MessageBox.Show("The Example Launcher failed to start, due to insufficient permissions. This may happen if you execute the application from a network share.", "OpenTK Example Launcher failed to start.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Trace.WriteLine(e.ToString()); } }
public static void Main() { // initialize log4net via app.config XmlConfigurator.Configure(); // show example browser using (var browser = new ExampleBrowser()) { Application.Run(browser); } }
public static void Main() { // initialize log4net via app.config if available if (ObjectTK.Logging.LogFactory.IsAvailable) { ConfigureLogging(); } // show example browser using (var browser = new ExampleBrowser()) { Application.Run(browser); } }
public static void Main() { try { // This seems to be useful enough to leave in for a while. TextWriterTraceListener console = new TextWriterTraceListener(System.Console.Out); Trace.Listeners.Add (console); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // The ExampleBrowser works pretty poorly on some platforms, so you may want to start examples directly. // for example: Examples.Tutorial.T12_GLSL_Parallax.Main (); // Examples.Tutorial.T10_GLSL_Cube.Main (); Examples.Tests.BasicMouseInput.Main (); using (Form browser = new ExampleBrowser()) { try { if (File.Exists("debug.log")) File.Delete("debug.log"); if (File.Exists("trace.log")) File.Delete("trace.log"); } catch (Exception expt) { MessageBox.Show("Could not access debug.log", expt.ToString()); } Application.Run(browser); } } catch (System.Security.SecurityException e) { MessageBox.Show("The Example Launcher failed to start, due to insufficient permissions. This may happen if you execute the application from a network share.", "OpenTK Example Launcher failed to start.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Trace.WriteLine(e.ToString()); } }