Program.cs 891 B

123456789101112131415161718192021222324252627282930
  1. 
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. using System.Windows.Forms;
  7. namespace IMCS
  8. {
  9. static class Program
  10. {
  11. /// <summary>
  12. /// 应用程序的主入口点。
  13. /// </summary>
  14. [STAThread]
  15. static void Main()
  16. {
  17. Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
  18. Application.ThreadException += Application_ThreadException;
  19. Application.EnableVisualStyles();
  20. Application.SetCompatibleTextRenderingDefault(false);
  21. Application.Run(new Form_Main());
  22. }
  23. private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
  24. {
  25. YG.Log.Instance.WriteLogAdd($"Application_ThreadException-->26-->{e.Exception}");
  26. }
  27. }
  28. }