- 摄像头:自绘东围墙场景(Camera/scene.svg),按云台位置切成 640×480 帧(build-frames.ts); Pan 每次转一格,红外对射被遮挡时画面出现翻墙的人;类名、委托、事件参数与教材 dll 一致, ImageRead 每 250 ms 在后台线程触发 - Image / Bitmap 保存真实图片数据:Save、FromFile、FromStream,文件夹不存在时报 GDI+ 一般性错误; 图片每张只发给浏览器一次(按内容哈希缓存) - 程序所在目录(AppDomain.CurrentDomain.BaseDirectory,编译检查单独放行)和当前目录指向可写的 bin/Debug, 沙箱里在沙箱的临时目录 - PictureBox(SizeMode、BorderStyle);设计器工具箱加"图片框";运行区显示程序保存的图片,点开看大图; 实训台摄像头图标显示开启状态 - 评分规则加图片框显示图片、摄像头开关与转向、保存图片三种检查;示例 p4-t2-网络摄像机 - 测试:摄像头端到端、图片读写与程序目录、AppDomain 编译检查、评分出错情况 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
339 lines
5.4 KiB
CSS
339 lines
5.4 KiB
CSS
/* 仿 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: 100000;
|
|
}
|
|
|
|
.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-picturebox {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.wf-picturebox img {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
display: block;
|
|
user-select: none;
|
|
}
|
|
|
|
.wf-picturebox-border-FixedSingle {
|
|
border: 1px solid #646464;
|
|
}
|
|
|
|
.wf-picturebox-border-Fixed3D {
|
|
border: 2px inset #a0a0a0;
|
|
}
|
|
|
|
.wf-listbox {
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
background: #fff;
|
|
cursor: default;
|
|
}
|
|
|
|
.wf-listbox-border-Fixed3D {
|
|
border: 1px solid #828790;
|
|
}
|
|
|
|
.wf-listbox-border-FixedSingle {
|
|
border: 1px solid #646464;
|
|
}
|
|
|
|
.wf-listbox-item {
|
|
padding: 0 2px;
|
|
white-space: pre;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.wf-listbox-selected {
|
|
background: #0078d7;
|
|
color: #fff;
|
|
}
|
|
|
|
.wf-disabled .wf-listbox-selected {
|
|
background: #bfbfbf;
|
|
}
|
|
|
|
.wf-check {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 3px;
|
|
white-space: pre;
|
|
cursor: default;
|
|
}
|
|
|
|
.wf-checkbox-box,
|
|
.wf-radio-dot {
|
|
flex: none;
|
|
width: 13px;
|
|
height: 13px;
|
|
box-sizing: border-box;
|
|
border: 1px solid #333;
|
|
background: #fff;
|
|
}
|
|
|
|
.wf-radio-dot {
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.wf-checkbox-box[data-checked="true"]::after {
|
|
content: "✓";
|
|
display: block;
|
|
font: bold 11px/11px sans-serif;
|
|
text-align: center;
|
|
color: #333;
|
|
}
|
|
|
|
.wf-radio-dot[data-checked="true"] {
|
|
background: radial-gradient(circle, #333 0 3px, #fff 3.5px);
|
|
}
|
|
|
|
.wf-check:hover:not(.wf-disabled) .wf-checkbox-box,
|
|
.wf-check:hover:not(.wf-disabled) .wf-radio-dot {
|
|
border-color: #0078d7;
|
|
}
|
|
|
|
.wf-device-image {
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 与教材控件一致:图片以原始尺寸从左上角显示 */
|
|
.wf-device-image img {
|
|
display: block;
|
|
user-select: none;
|
|
}
|
|
|
|
.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: 200000;
|
|
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;
|
|
}
|