-
Notifications
You must be signed in to change notification settings - Fork 1
/
Main.cs
34 lines (31 loc) · 1.01 KB
/
Main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Windows.Forms;
using Gtk;
using GLib;
namespace glomp
{
class MainClass
{
static void OnException(GLib.UnhandledExceptionArgs args)
{
string errorMsg = "An application error occurred. Please contact the adminstrator " +
"with the following information:\n\n";
errorMsg = errorMsg + args.ExceptionObject.ToString() + "\n";
MessageBox.Show(errorMsg, "Glib error error {0}", MessageBoxButtons.AbortRetryIgnore,
MessageBoxIcon.Stop);
System.Diagnostics.Debug.WriteLine(errorMsg);
args.ExitApplication = false;
}
public static void Main (string[] args)
{
//System.Diagnostics.Debug.WriteLine(OpenTK.Graphics.GraphicsMode.Default);
UnhandledExceptionHandler h = new UnhandledExceptionHandler (OnException);
ExceptionManager.UnhandledException += h;
OpenTK.Toolkit.Init();
Gtk.Application.Init ();
MainWindow win = new MainWindow ();
win.Show ();
Gtk.Application.Run ();
}
}
}