Program.cs 791 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Windows.Forms;
  3. namespace CanOpenSlaveTest
  4. {
  5. static class Program
  6. {
  7. /// <summary>
  8. /// 应用程序的主入口点。
  9. /// </summary>
  10. [STAThread]
  11. static void Main()
  12. {
  13. Application.EnableVisualStyles();
  14. Application.SetCompatibleTextRenderingDefault(false);
  15. try
  16. {
  17. Application.Run(new SlaveTestForm());
  18. }
  19. catch (Exception ex)
  20. {
  21. MessageBox.Show(
  22. $"应用程序错误: {ex.Message}\n\n{ex.StackTrace}",
  23. "错误",
  24. MessageBoxButtons.OK,
  25. MessageBoxIcon.Error
  26. );
  27. }
  28. }
  29. }
  30. }