using System; using System.Windows.Forms; namespace CanOpenSlaveTest { static class Program { /// /// 应用程序的主入口点。 /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { Application.Run(new SlaveTestForm()); } catch (Exception ex) { MessageBox.Show( $"应用程序错误: {ex.Message}\n\n{ex.StackTrace}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error ); } } } }