Program.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Windows.Forms;
  3. using System.Threading;
  4. using System.Globalization;
  5. using Uninpho.DBOperation;
  6. using Uninpho.DBOperation.Operation;
  7. using DevExpress.LookAndFeel;
  8. namespace Uninpho.Tools
  9. {
  10. static class Program
  11. {
  12. /// <summary>
  13. /// 应用程序的主入口点。
  14. /// </summary>
  15. [STAThread]
  16. static void Main()
  17. {
  18. Application.EnableVisualStyles();
  19. Application.SetCompatibleTextRenderingDefault(false);
  20. Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CN");
  21. DevExpress.UserSkins.OfficeSkins.Register();
  22. DevExpress.Skins.SkinManager.EnableFormSkins();
  23. UserLookAndFeel.Default.SkinName = "Office 2010 Blue";
  24. //应用程序域下未处理的错误
  25. AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
  26. Application.Run(new DevFrmMain());
  27. }
  28. private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
  29. {
  30. Console.WriteLine(e.ExceptionObject.ToString());
  31. MessageBox.Show(e.ExceptionObject.ToString());
  32. }
  33. }
  34. }