From f30dcf5ef41d54c588d7b42c48be8d941abba72e Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 8 Jan 2017 09:57:10 -0500 Subject: Initial upload --- ShiftOS_TheReturn/Program.cs | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ShiftOS_TheReturn/Program.cs (limited to 'ShiftOS_TheReturn/Program.cs') diff --git a/ShiftOS_TheReturn/Program.cs b/ShiftOS_TheReturn/Program.cs new file mode 100644 index 0000000..d6c8979 --- /dev/null +++ b/ShiftOS_TheReturn/Program.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Diagnostics; + +namespace ShiftOS.Engine +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + public static void Main() + { + try + { + Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); + //Taxes: Remote Desktop Connection and painting + //http://blogs.msdn.com/oldnewthing/archive/2006/01/03/508694.aspx + Application.ThreadException += (o, a) => + { + CrashHandler.Start(a.Exception); + }; + + Application.ApplicationExit += (o, a) => + { + ServerManager.Disconnect(); + + //I really want a glass of juice. + //Process.GetCurrentProcess().Kill(); + }; + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + //Application.Run(new Desktop()); + } + catch(Exception ex) + { + CrashHandler.Start(ex); + + } + } + } +} -- cgit v1.2.3