重构配置管理,新增 JSON 支持及图标

更新 `App.config`,移除并重新添加配置项;新增 `AppConfig.json` 文件以支持 JSON 格式配置;在 `AppSetting.cs` 中实现从 JSON 加载配置功能;修改 `ComPortServer.cs` 以适应新的配置项;更新项目文件以引用 `AppConfig.json` 并调整 `nlog.config` 路径;新增应用程序图标 `logo.ico`。
This commit is contained in:
梅浩东
2025-04-15 09:44:16 +08:00
parent 2941e080b8
commit af01d6dfde
9 changed files with 646 additions and 136 deletions
+6 -1
View File
@@ -63,6 +63,9 @@
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>logo.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Acornima, Version=1.1.0.0, Culture=neutral, PublicKeyToken=496b38436bb9edeb, processorArchitecture=MSIL">
<HintPath>..\packages\Acornima.1.1.0\lib\net462\Acornima.dll</HintPath>
@@ -259,14 +262,16 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<EmbeddedResource Include="nlog.config">
<EmbeddedResource Include="Configs\nlog.config">
<CustomToolNamespace>WssBarrageService</CustomToolNamespace>
</EmbeddedResource>
<None Include="AppConfig.json" />
<None Include="packages.config" />
<None Include="Properties\app.manifest" />
</ItemGroup>
<ItemGroup>
<Content Include="FodyWeavers.xml" />
<Content Include="logo.ico" />
<EmbeddedResource Include="Scripts\engine\comPortFilter.js" />
<EmbeddedResource Include="Scripts\inject\livePage.js" />
</ItemGroup>