private static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(OnUnhandledException); Application.ThreadException += new ThreadExceptionEventHandler(OnFormsUnhandledException); try { Ini.IniFile file = new Ini.IniFile(MainWindow.settings_path); if (file.Exists()) { file.Load(); try { if (bool.Parse(file["OptionsUpdates"]["chkAutoUpdate"])) { if (CheckUpdates()) { return; } } } catch { if (CheckUpdates()) { return; } } } if (!DirectX_HUDs.AeroEnabled) { MessageBox.Show("Desktop Window Manager (DWM) is not enabled. Without DWM, the DirectX overlays used by this program will have a significant performance penalty and may not work properly.\n\nDWM is only available on Windows Vista and later, and requires the Aero theme.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } runApplication(); } catch (ThreadAbortException) { } catch (Exception exception) { WT.ReportCrash(exception, ApplicationTitle + " " + ApplicationVersion); } }