- 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>
44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
|
|
namespace System.Windows.Forms;
|
|
|
|
public class MouseEventArgs : EventArgs
|
|
{
|
|
public MouseEventArgs(MouseButtons button, int clicks, int x, int y, int delta)
|
|
{
|
|
Button = button;
|
|
Clicks = clicks;
|
|
X = x;
|
|
Y = y;
|
|
Delta = delta;
|
|
}
|
|
|
|
public MouseButtons Button { get; }
|
|
public int Clicks { get; }
|
|
public int X { get; }
|
|
public int Y { get; }
|
|
public int Delta { get; }
|
|
public System.Drawing.Point Location => new(X, Y);
|
|
}
|
|
|
|
public delegate void MouseEventHandler(object? sender, MouseEventArgs e);
|
|
|
|
public class FormClosingEventArgs : CancelEventArgs
|
|
{
|
|
public FormClosingEventArgs(CloseReason closeReason, bool cancel) : base(cancel) => CloseReason = closeReason;
|
|
|
|
public CloseReason CloseReason { get; }
|
|
}
|
|
|
|
public delegate void FormClosingEventHandler(object? sender, FormClosingEventArgs e);
|
|
|
|
public class FormClosedEventArgs : EventArgs
|
|
{
|
|
public FormClosedEventArgs(CloseReason closeReason) => CloseReason = closeReason;
|
|
|
|
public CloseReason CloseReason { get; }
|
|
}
|
|
|
|
public delegate void FormClosedEventHandler(object? sender, FormClosedEventArgs e);
|