Просмотр исходного кода

fix: 补充csproj文件引用 + 消除SaveImageAsync的CS1998警告

- TeamAAS-VP.csproj 添加 DelaySaveImage.cs / DelaySaveImageNotification.cs 编译引用
- SaveImageAsync 添加 await Task.CompletedTask 消除缺少await的编译警告
zly 2 месяцев назад
Родитель
Сommit
2ca70c0501
2 измененных файлов с 3 добавлено и 0 удалено
  1. 2 0
      TeamAAS-VM/TeamAAS-VP.csproj
  2. 1 0
      TeamAAS-VM/Views/Home/ShowVisionRender.xaml.cs

+ 2 - 0
TeamAAS-VM/TeamAAS-VP.csproj

@@ -787,6 +787,7 @@
     <Compile Include="Events\PalletLayoutNotification.cs" />
     <Compile Include="Events\ProgressNotification.cs" />
     <Compile Include="Events\RenderUpdateNotification.cs" />
+    <Compile Include="Events\DelaySaveImageNotification.cs" />
     <Compile Include="Events\SnackbarMessageNotification.cs" />
     <Compile Include="Events\TaskMessageNotification.cs" />
     <Compile Include="Events\UserLoginNotification.cs" />
@@ -828,6 +829,7 @@
     <Compile Include="Models\Robot\RPoint.cs" />
     <Compile Include="Models\ScriptCompileMessage.cs" />
     <Compile Include="Models\ShowRender.cs" />
+    <Compile Include="Models\DelaySaveImage.cs" />
     <Compile Include="Models\StatusInfo.cs" />
     <Compile Include="Models\TaskMessage.cs" />
     <Compile Include="Models\Robot\ToolInfo.cs" />

+ 1 - 0
TeamAAS-VM/Views/Home/ShowVisionRender.xaml.cs

@@ -780,6 +780,7 @@ namespace TeamAAS_VP.Views.Home
 
             try
             {
+                await Task.CompletedTask; // 消除 CS1998:调用者已在后台线程,下方所有 I/O 为同步执行
                 cancellationToken.ThrowIfCancellationRequested();
 
                 DateTime now = DateTime.Now;