refactor: 插件 UI 从 WinForms 迁移到 CycleGUI,并修复代码质量问题
将 StandardScene 各插件的配置/监控窗体从 WinForms 迁移到 CycleGUI(删除 .Designer.cs/.resx,重写为 PanelBuilder 立即模式 UI,新增 CycleUiHelper 统一对话框)。 同时修复代码审核中的问题: - 后台文件写入加锁 + try/catch(ButtonBoxManager / DoorManager,对齐 LoopViewer.SaveTasks 模式) - CoderFieldsMetadata.cs 启用 #nullable enable,消除 CS8632 警告 - DummyCar 移除已废弃的 rightClickAction()/SetPosition() - CarRemoteHelper.OpenVehicleWebPage 的 Process.Start 加 try/catch - 重命名名不副实的 Mstsc()(现为打开网页) - 统一弃元命名为 _ - TrafficInterlockViewer 改用稳定 Id(GUID)做选择/编辑,替代行索引 - csproj 改用 $(CGUILibDir) 解析 CycleGUI,绝对路径收敛到 Directory.Build.props 构建:dotnet build StandardScene.sln → 0 错误,30 警告(均为历史遗留)。 注:static 单例状态重构(审核第 8 项)暂未处理,留待单独任务。
This commit is contained in:
+18
-16
@@ -480,8 +480,8 @@
|
||||
|
||||
<div class="stats">
|
||||
<div class="stat">
|
||||
<div class="value">.NET 4.8</div>
|
||||
<div class="label">工程目标框架</div>
|
||||
<div class="value">.NET 8</div>
|
||||
<div class="label">工程目标框架 (net8.0-windows)</div>
|
||||
</div>
|
||||
<div class="stat">
|
||||
<div class="value">Plugin DLL</div>
|
||||
@@ -527,7 +527,7 @@
|
||||
<section class="panel" id="overview">
|
||||
<h3>01. 项目总览</h3>
|
||||
<p>
|
||||
`StandardScene` 是 AGV/AMR 场景插件库,不是独立 EXE。它依赖宿主 `SimpleComposer.exe` 运行,能力覆盖搬运调度、环线任务、
|
||||
`StandardScene` 是 AGV/AMR 场景插件库,不是独立 EXE。它依赖宿主 `SimpleLite.exe`(CycleGUI 应用)运行,能力覆盖搬运调度、环线任务、
|
||||
交通互锁、区域流量控制、充电协同、门控联动,以及 HTTP / MQTT / Modbus 等外围接口。
|
||||
</p>
|
||||
<div class="cards">
|
||||
@@ -546,7 +546,7 @@
|
||||
</div>
|
||||
<div class="pill-row">
|
||||
<span class="pill">输出类型:Library</span>
|
||||
<span class="pill">宿主:SimpleComposer.exe</span>
|
||||
<span class="pill">宿主:SimpleLite.exe</span>
|
||||
<span class="pill">外部接口:Nancy / HTTP</span>
|
||||
<span class="pill">典型协议:MQTT / Modbus</span>
|
||||
</div>
|
||||
@@ -566,7 +566,7 @@
|
||||
<tr>
|
||||
<td>宿主层</td>
|
||||
<td>启动程序、装载插件、展示配置与 Mission</td>
|
||||
<td><code>build/SimpleComposer.exe</code></td>
|
||||
<td><code>SimpleLite.exe</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>场景逻辑层</td>
|
||||
@@ -650,21 +650,23 @@
|
||||
<h3>04. 构建与运行</h3>
|
||||
<h4>本机依赖路径</h4>
|
||||
<pre><code>D:\MDCS\Dependencies\Commons\CommonUsage.dll
|
||||
D:\MDCS\Dependencies\deps\LessokajiWeaverUtilities.dll
|
||||
D:\MDCS\Dependencies\Commons\MDCSToolBox.dll
|
||||
D:\MDCS\Dependencies\Simple\RefSimpleCore.dll
|
||||
D:\MDCS\Executables\Simple\SimpleComposer.exe</code></pre>
|
||||
D:\MDCS\Dependencies\Commons\CycleGUI.dll
|
||||
..\Simple\SimpleLite\bin\Debug\SimpleLite.dll
|
||||
..\Simple\SimpleLite\bin\Debug\LessokajiWeaverUtilities.dll
|
||||
..\Simple\SimpleCore\bin\Debug\netstandard2.0\SimpleCore.dll</code></pre>
|
||||
|
||||
<h4>构建步骤</h4>
|
||||
<ol>
|
||||
<li>先构建宿主依赖:<code>dotnet build Simple\SimpleLite\SimpleLite.csproj</code>(一并构建 SimpleCore)</li>
|
||||
<li>打开 <code>StandardScene.sln</code></li>
|
||||
<li>编译 <code>Debug|Any CPU</code> 或 <code>Release|Any CPU</code></li>
|
||||
<li>确认构建事件已将插件复制到 <code>build/plugins</code></li>
|
||||
<li>运行 <code>build/SimpleComposer.exe</code></li>
|
||||
<li>编译 <code>Debug|x64</code> 或 <code>Release|x64</code></li>
|
||||
<li>确认 <code>Directory.Build.targets</code> 已将 5 个插件 DLL 复制到 <code>build/plugins</code></li>
|
||||
<li>将 <code>build/plugins</code> 部署到宿主 <code>plugins/</code>,运行 <code>SimpleLite.exe</code></li>
|
||||
</ol>
|
||||
|
||||
<div class="warning">
|
||||
当前项目不是 SDK 风格工程。新增 `.cs` 文件后,必须确认它已经被加入 `.csproj`;否则文件存在但不会参与编译。
|
||||
当前项目已是 SDK 风格工程(`net8.0-windows`),目录下 `.cs` 文件会被自动包含,无需手工加入 `.csproj`。注意:StandardScene 通过 `HintPath` 引用宿主产物,构建前必须先编译 Simple 解决方案,否则会报 `SimpleCore` 版本不匹配。
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -677,7 +679,7 @@ D:\MDCS\Executables\Simple\SimpleComposer.exe</code></pre>
|
||||
</p>
|
||||
<pre><code>using System.Threading;
|
||||
using Newtonsoft.Json;
|
||||
using SimpleComposer.RCS;
|
||||
using SimpleLite.RCS;
|
||||
using SimpleCore;
|
||||
|
||||
namespace StandardScene.Scheduler
|
||||
@@ -721,9 +723,9 @@ namespace StandardScene.Scheduler
|
||||
}
|
||||
}</code></pre>
|
||||
<ol>
|
||||
<li>新建 <code>Scheduler/HelloMission.cs</code></li>
|
||||
<li>确认它已被加入工程</li>
|
||||
<li>编译并打开 <code>build/SimpleComposer.exe</code></li>
|
||||
<li>新建 <code>Scheduler/HelloMission.cs</code>(SDK 工程自动包含)</li>
|
||||
<li>补上 <code>[MissionType]</code> 特性与静态 <code>Create()</code></li>
|
||||
<li>编译后部署到宿主 <code>plugins/</code>,运行 <code>SimpleLite.exe</code></li>
|
||||
<li>启动后观察 <code>status.status</code> 是否按秒递增</li>
|
||||
</ol>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user