第 0 阶段:教材项目 2 任务 1 在网页中原样运行

- runtime:仿真 WinForms 子集(Form、Button、Label、TextBox、ComboBox、
  GroupBox、Timer、MessageBox、界面线程消息循环、跨线程检查)、
  教材设备类库(DeviceCtrlHelper、LED 控件)、运行器(常驻编译服务 + 运行模式)
- server:Bun + Hono,WebSocket 会话,每次运行一个进程,消息转发
- web:Vue + Naive UI,WinForms 风格窗体渲染、MessageBox、实训台 LED 屏
- 端到端测试与 100 个程序并发的压力测试
- 教材逐任务摘要(docs/教材摘要)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-22 10:15:14 +08:00
commit 98be8331bc
71 files changed
+7919

No files matched your search

+238
View File
@@ -0,0 +1,238 @@
/* 仿 Windows 10 经典 WinForms 外观。默认字体对应中文 Windows 上的宋体 9pt。 */
.wf-window {
position: absolute;
background: #f0f0f0;
border: 1px solid #1883d7;
box-shadow: 0 6px 24px rgb(0 0 0 / 0.25);
font-family: "SimSun", "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", serif;
font-size: 12px;
color: #000;
user-select: none;
}
.wf-window-modal {
z-index: 10;
}
.wf-titlebar {
display: flex;
align-items: center;
height: 30px;
background: #fff;
cursor: default;
}
.wf-title {
flex: 1;
padding-left: 8px;
font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
font-size: 12px;
white-space: nowrap;
overflow: hidden;
}
.wf-titlebar-button {
width: 46px;
line-height: 30px;
text-align: center;
font-size: 11px;
color: #333;
}
.wf-titlebar-close:hover {
background: #e81123;
color: #fff;
}
.wf-client {
position: relative;
overflow: hidden;
}
.wf-control {
position: absolute;
box-sizing: border-box;
font: inherit;
color: inherit;
}
.wf-button {
background: #e1e1e1;
border: 1px solid #adadad;
padding: 0;
cursor: default;
}
.wf-button:hover:not(:disabled) {
background: #e5f1fb;
border-color: #0078d7;
}
.wf-button:active:not(:disabled) {
background: #cce4f7;
border-color: #005499;
}
.wf-button:disabled,
.wf-disabled {
color: #a0a0a0;
}
.wf-label {
white-space: pre;
overflow: hidden;
}
.wf-textbox input,
.wf-textbox textarea,
.wf-combobox input {
width: 100%;
height: 100%;
box-sizing: border-box;
border: 1px solid #7a7a7a;
background: #fff;
font: inherit;
color: inherit;
padding: 1px 2px;
outline: none;
resize: none;
}
.wf-textbox input:focus,
.wf-textbox textarea:focus,
.wf-combobox input:focus {
border-color: #0078d7;
}
.wf-textbox input[readonly],
.wf-textbox textarea[readonly] {
background: #f0f0f0;
}
.wf-combobox input {
padding-right: 18px;
}
.wf-combobox-arrow {
position: absolute;
right: 1px;
top: 1px;
bottom: 1px;
width: 16px;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
background: #fff;
}
.wf-combobox-list {
position: absolute;
top: 100%;
left: 0;
right: 0;
z-index: 5;
margin: 0;
padding: 0;
list-style: none;
background: #fff;
border: 1px solid #646464;
max-height: 160px;
overflow-y: auto;
}
.wf-combobox-list li {
padding: 1px 3px;
}
.wf-combobox-list li:hover {
background: #0078d7;
color: #fff;
}
.wf-groupbox-frame {
position: absolute;
inset: 6px 0 0 0;
border: 1px solid #dcdcdc;
border-radius: 2px;
}
.wf-groupbox-caption {
position: absolute;
left: 6px;
top: 0;
padding: 0 2px;
background: #f0f0f0;
line-height: 12px;
white-space: pre;
}
.wf-led {
overflow: hidden;
background: #000;
color: red;
}
.wf-led-text {
position: absolute;
top: 20px;
left: 0;
line-height: 1;
white-space: pre;
animation: wf-led-scroll linear infinite;
}
@keyframes wf-led-scroll {
from {
transform: translateX(var(--wf-led-from));
}
to {
transform: translateX(var(--wf-led-to));
}
}
.wf-modal-backdrop {
position: absolute;
inset: 0;
z-index: 20;
display: flex;
align-items: center;
justify-content: center;
background: rgb(0 0 0 / 0.08);
}
.wf-messagebox {
position: static;
min-width: 240px;
max-width: 480px;
}
.wf-messagebox-body {
display: flex;
gap: 12px;
align-items: center;
padding: 24px 28px;
background: #fff;
font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}
.wf-messagebox-icon {
font-size: 28px;
}
.wf-messagebox-text {
white-space: pre-wrap;
}
.wf-messagebox-buttons {
display: flex;
justify-content: flex-end;
gap: 8px;
padding: 10px 12px;
}
.wf-messagebox-buttons .wf-button {
min-width: 75px;
height: 23px;
}