Example #1
0
        public static int Main(string[] args) 
        {
            startupTime = DateTime.Now;

#if !DEBUG
            try
            {
#endif
                AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;

                instance = new Startup(args);
                instance.Start();
#if !DEBUG
            }

            catch (Exception ex)
            {
                try
                {
                    UnhandledException(ex);
                    Process.GetCurrentProcess().Kill();
                }

                catch (Exception)
                {
                    MessageBox.Show(ex.ToString());
                    Process.GetCurrentProcess().Kill();
                }
            }
#endif

            return 0;
        }