Example #1
0
        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)
            {
                //new frmShowError(CustomExceptionHandler.ShowExceptionText(ex)).ShowDialog();
                //System.Diagnostics.Debugger.Break();
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
        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);
                }
            }
        }