- 界面取自配套参考工程,用设计器引擎按书上表格改控件名(label1 → lbl_port 等), 去掉 BOM、换行统一为 LF;代码按书整理,修正 boolIsOpen 等印刷错误 - 测试:所有示例都能编译(10 个),以及计算器 / 多态、红外对射、报警灯、火焰的行为测试 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
496 B
C#
23 lines
496 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace 报警灯
|
|
{
|
|
static class Program
|
|
{
|
|
/// <summary>
|
|
/// 应用程序的主入口点。
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
Application.Run(new Form1());
|
|
}
|
|
}
|
|
}
|