static void Main(string[] pArgs) { try { _ParseApplicationSettings(pArgs); #if DEBUG TechnicalSettings.EnsureKeyExists(); #endif Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(UserSettings.Language); Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture; Application.EnableVisualStyles(); Application.DoEvents(); ConfigureAutoMapper(); var bootstrapper = new Bootstrapper(new Container()); Application.Run(bootstrapper.GetAppContext()); } catch (Exception ex) { if (ex.InnerException != null) { MessageBox.Show(ex.InnerException.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
static void Main(string[] pArgs) { try { Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(UserSettings.Language); Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture; Thread.CurrentThread.CurrentCulture.NumberFormat = new NumberFormatInfo { NumberGroupSeparator = " ", NumberDecimalSeparator = ",", }; _ParseApplicationSettings(pArgs); Application.EnableVisualStyles(); Application.DoEvents(); ConfigureAutoMapper(); var bootstrapper = new Bootstrapper(new Container()); Application.Run(bootstrapper.GetAppContext()); } catch (Exception ex) { //new frmShowError(CustomExceptionHandler.ShowExceptionText(ex)).ShowDialog(); //System.Diagnostics.Debugger.Break(); MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }