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());
            }
        }
예제 #2
0
        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());
                }
            }
        }
예제 #3
0
        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());
            }
        }
예제 #4
0
 public static void Main()
 {
     // initialize log4net via app.config
     XmlConfigurator.Configure();
     // show example browser
     using (var browser = new ExampleBrowser())
     {
         Application.Run(browser);
     }
 }
예제 #5
0
 public static void Main()
 {
     // initialize log4net via app.config
     XmlConfigurator.Configure();
     // show example browser
     using (var browser = new ExampleBrowser())
     {
         Application.Run(browser);
     }
 }
예제 #6
0
        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);
            }
        }
예제 #7
0
파일: Main.cs 프로젝트: sworter/opentk
        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());
            }
        }
예제 #8
0
파일: Main.cs 프로젝트: andykorth/opentk
        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());
                }
            }
        }