Program.cs 890 B

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