private void btnCancel_Click(object sender, EventArgs e) { try { //Load the previous settings AcSettings.Load(); ReInitAllForms(); this.Close(); } catch (Exception ex) { AcControls.Utilities.AcUtilities.DebugWrite(ex.ToString()); } }
static void Main() { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); AcSettings.Load(); Application.Run(new frmMain()); } catch (Exception ex) { Debug.WriteLine(ex); MessageBox.Show("Unhandled exception!\r\n" + ex, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); } }