diff --git a/src/SopHelper.Avalonia/Presentation/DesktopPlatform.cs b/src/SopHelper.Avalonia/Presentation/DesktopPlatform.cs index 6b6a082..efe2852 100644 --- a/src/SopHelper.Avalonia/Presentation/DesktopPlatform.cs +++ b/src/SopHelper.Avalonia/Presentation/DesktopPlatform.cs @@ -89,15 +89,3 @@ public sealed class SaveFileDialog if(file is null)return false; FileName=file.TryGetLocalPath()??throw new IOException("请选择本地保存位置");return true; } } -public sealed class OpenFolderDialog -{ public string Title { get; set; } = "选择文件夹"; - public string InitialDirectory { get; set; } = ""; - public string FolderName { get; private set; } = ""; - public async Task ShowDialogAsync() - { - var storage=DesktopPlatform.Owner.StorageProvider; - var folders=await storage.OpenFolderPickerAsync(new FolderPickerOpenOptions { Title=Title,AllowMultiple=false, - SuggestedStartLocation=Directory.Exists(InitialDirectory)?await storage.TryGetFolderFromPathAsync(InitialDirectory):null }); - if(folders.Count==0)return false; FolderName=folders[0].TryGetLocalPath()??throw new IOException("请选择本地文件夹");return true; - } -} diff --git a/src/SopHelper.Avalonia/Training/CameraFlowTest.cs b/src/SopHelper.Avalonia/SopVideo/CameraFlowTest.cs similarity index 99% rename from src/SopHelper.Avalonia/Training/CameraFlowTest.cs rename to src/SopHelper.Avalonia/SopVideo/CameraFlowTest.cs index fc5296f..594bb98 100644 --- a/src/SopHelper.Avalonia/Training/CameraFlowTest.cs +++ b/src/SopHelper.Avalonia/SopVideo/CameraFlowTest.cs @@ -5,7 +5,7 @@ using SopHelper.Engine.Sop; using OpenCvSharp; using SopHelper.Presentation.Imaging; -namespace SopHelper.Training; +namespace SopHelper.SopVideo; public sealed partial class CameraViewModel { diff --git a/src/SopHelper.Avalonia/Training/CameraVideoImport.cs b/src/SopHelper.Avalonia/SopVideo/CameraVideoImport.cs similarity index 95% rename from src/SopHelper.Avalonia/Training/CameraVideoImport.cs rename to src/SopHelper.Avalonia/SopVideo/CameraVideoImport.cs index 3103753..5fbaf65 100644 --- a/src/SopHelper.Avalonia/Training/CameraVideoImport.cs +++ b/src/SopHelper.Avalonia/SopVideo/CameraVideoImport.cs @@ -5,7 +5,7 @@ using OpenCvSharp; using SopHelper.Engine.Training; using SopHelper.Presentation; -namespace SopHelper.Training; +namespace SopHelper.SopVideo; public sealed partial class CameraViewModel { @@ -27,7 +27,7 @@ public sealed partial class CameraViewModel } if (string.IsNullOrWhiteSpace(source) || _closing) return; var destination = Path.GetFullPath(StandardVideoPath); - if (!RecipeWorkspace.IsWithin(destination, _recipeRecordingDirectory!)) + if (!RecipeWorkspace.IsWithin(destination, SaveDirectory)) throw new IOException("标准视频路径不在当前配方目录中"); if (Path.GetFullPath(source).Equals(destination, OperatingSystem.IsWindows() ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal)) { Status = "所选文件已经是当前标准视频"; return; } @@ -63,7 +63,7 @@ public sealed partial class CameraViewModel RecordingInfo = $"已导入 · {duration.TotalSeconds:F1} 秒"; Status = "标准视频已导入当前配方的 sop_stand/sop.avi,可播放或测试流程"; StateChanged(); - try { SopStandardVideoDuration.Remember(Path.GetDirectoryName(_recipeRecordingDirectory!)!, duration); } + try { SopStandardVideoDuration.Remember(Path.GetDirectoryName(SaveDirectory)!, duration); } catch (Exception error) when (error is IOException or UnauthorizedAccessException) { Status += ";标准用时保存失败:" + error.Message; } } diff --git a/src/SopHelper.Avalonia/Training/CameraViewModel.cs b/src/SopHelper.Avalonia/SopVideo/CameraViewModel.cs similarity index 76% rename from src/SopHelper.Avalonia/Training/CameraViewModel.cs rename to src/SopHelper.Avalonia/SopVideo/CameraViewModel.cs index dda221c..6a65fe2 100644 --- a/src/SopHelper.Avalonia/Training/CameraViewModel.cs +++ b/src/SopHelper.Avalonia/SopVideo/CameraViewModel.cs @@ -2,7 +2,6 @@ using System.Diagnostics; using System.IO; -using System.Text.Json; using Avalonia; using SopHelper.Presentation; using Avalonia.Media; @@ -10,11 +9,13 @@ using SopHelper.Presentation.Imaging; using SopHelper.Presentation.Threading; using OpenCvSharp; using SopHelper.Engine.Camera; +using SopHelper.Engine.Training; using Prism.Commands; using Prism.Mvvm; -namespace SopHelper.Training; +namespace SopHelper.SopVideo; +/// 管理当前配方的标准视频、录像预览和流程回测,关闭时统一释放相机与播放资源。 public sealed partial class CameraViewModel : BindableBase { private readonly ICameraService _camera; @@ -22,9 +23,6 @@ public sealed partial class CameraViewModel : BindableBase private readonly object _frames = new(); private readonly Dispatcher _dispatcher; private readonly DispatcherTimer _timer; - private readonly string _settingsPath; - private readonly string? _recipeRecordingDirectory; - private readonly bool _sopStandard; private readonly Func _selectedCameraProvider; private readonly Stopwatch _previewClock = Stopwatch.StartNew(); private Mat? _latest; @@ -35,7 +33,6 @@ public sealed partial class CameraViewModel : BindableBase private bool _busy, _previewing, _recording; private bool _paused; private string _status = "使用运行设置中选中的相机,点击“开启相机预览”"; - private string _directory; private string _lastRecording = ""; private string _recordingInfo = "未录像"; private CameraInfo? _previewCamera, _observedCamera; @@ -57,18 +54,16 @@ public sealed partial class CameraViewModel : BindableBase public bool IsPaused { get => _paused; private set { SetProperty(ref _paused, value); StateChanged(); } } public string PauseButtonText => IsPaused ? "继续录制" : "暂停录制"; public string StandardVideoPath => Path.Combine(SaveDirectory, "sop.avi"); - public bool HasStandardVideo => _sopStandard && File.Exists(StandardVideoPath); + public bool HasStandardVideo => File.Exists(StandardVideoPath); public Func>? ConfirmRestartAsync { get; set; } - public bool CanChangeDirectory => _recipeRecordingDirectory is null && !IsBusy && !IsRecording && !_closing; public string PreviewButtonText => IsPreviewing ? "关闭相机" : "开启相机预览"; public string RecordingInfo { get => _recordingInfo; private set => SetProperty(ref _recordingInfo, value); } - public string SaveDirectory { get => _directory; set => SetProperty(ref _directory, _recipeRecordingDirectory ?? value); } + public string SaveDirectory { get; } public string LastRecording { get => _lastRecording; private set { SetProperty(ref _lastRecording, value); UpdateCommands(); } } public double RecordingFps { get; set; } = 30; public DelegateCommand PreviewCommand { get; } public DelegateCommand StartRecordingCommand { get; } public DelegateCommand StopRecordingCommand { get; } - public DelegateCommand BrowseCommand { get; } public DelegateCommand RevealCommand { get; } public DelegateCommand PauseCommand { get; } public DelegateCommand RestartCommand { get; } @@ -82,36 +77,28 @@ public sealed partial class CameraViewModel : BindableBase public DelegateCommand ImportVideoCommand { get; } public event Action? RecordingLimitReached; - public CameraViewModel(ICameraService camera, string root, string? recipeName = null, TimeProvider? timeProvider = null, bool sopStandard = false, Func? selectedCameraProvider = null) + /// 绑定已保存配方的固定视频目录,并接管传入相机的生命周期。 + public CameraViewModel(ICameraService camera, string root, string recipeName, TimeProvider? timeProvider = null, Func? selectedCameraProvider = null) { _selectedCameraProvider = selectedCameraProvider ?? (() => null); _recorder = new VideoRecorder(timeProvider); _camera = camera; _dispatcher = Dispatcher.CurrentDispatcher; - var recipeDirectory = string.IsNullOrWhiteSpace(recipeName) ? null : new SopHelper.Engine.Training.RecipeWorkspace(root).DirectoryFor(recipeName); - _sopStandard = sopStandard; - if (sopStandard && recipeDirectory is null) throw new ArgumentException("SOP录像必须属于已保存的配方"); - _recipeRecordingDirectory = recipeDirectory is null ? null : Path.Combine(recipeDirectory, sopStandard ? "sop_stand" : "recordings"); - _directory = _recipeRecordingDirectory ?? Path.Combine(root, "workspace", "recordings"); - _settingsPath = recipeDirectory is null ? Path.Combine(root, "workspace", "camera-settings.json") : Path.Combine(recipeDirectory, sopStandard ? "sop-camera-settings.json" : "camera-settings.json"); - try - { - SaveDirectory = _recipeRecordingDirectory ?? ReadSaveDirectory(root); - } - catch (Exception e) { Status = "录像目录配置读取失败:" + e.Message; } + ArgumentException.ThrowIfNullOrWhiteSpace(recipeName); + SaveDirectory = Path.Combine(new RecipeWorkspace(root).DirectoryFor(recipeName), "sop_stand"); PreviewCommand = Command(TogglePreviewAsync, () => !IsBusy && !_closing && !IsTestingFlow && (IsPreviewing || SelectedCamera != null)); StartRecordingCommand = Command(StartRecordingAsync, () => !IsBusy && !_closing && !IsRecording && !HasStandardVideo && IsPreviewing && Preview != null && HasRecentFrame); StopRecordingCommand = Command(() => { StopRecording(); return Task.CompletedTask; }, () => !IsBusy && !_closing && IsRecording); PauseCommand = Command(() => { TogglePause(); return Task.CompletedTask; }, () => !IsBusy && !_closing && IsRecording); - RestartCommand = Command(RestartRecordingAsync, () => _sopStandard && !IsBusy && !_closing && !IsTestingFlow && HasStandardVideo && IsPreviewing && Preview != null && HasRecentFrame); - PlayVideoCommand = Command(PlayVideoAsync, () => _sopStandard && !IsBusy && !_closing && !IsTestingFlow && !IsRecording && HasStandardVideo && !Playback.IsPlaying); + RestartCommand = Command(RestartRecordingAsync, () => !IsBusy && !_closing && !IsTestingFlow && HasStandardVideo && IsPreviewing && Preview != null && HasRecentFrame); + PlayVideoCommand = Command(PlayVideoAsync, () => !IsBusy && !_closing && !IsTestingFlow && !IsRecording && HasStandardVideo && !Playback.IsPlaying); PauseVideoCommand = Command(() => { Playback.Pause(); Status = "视频播放已暂停"; return Task.CompletedTask; }, () => !IsBusy && !_closing && !IsTestingFlow && Playback.IsPlaying); ToggleVideoPlaybackCommand = Command(async () => { if (Playback.IsPlaying) { Playback.Pause(); Status = "视频播放已暂停"; } else await PlayVideoAsync(); - }, () => _sopStandard && !IsBusy && !_closing && !IsTestingFlow && !IsRecording && HasStandardVideo); - ImportVideoCommand = Command(ImportVideoAsync, () => _sopStandard && !IsBusy && !_closing && !IsTestingFlow && !IsRecording); - TestFlowCommand = Command(StartFlowTestAsync, () => _sopStandard && !IsBusy && !_closing && !IsTestingFlow && !IsRecording && HasStandardVideo && FlowTestConfigProvider is not null); + }, () => !IsBusy && !_closing && !IsTestingFlow && !IsRecording && HasStandardVideo); + ImportVideoCommand = Command(ImportVideoAsync, () => !IsBusy && !_closing && !IsTestingFlow && !IsRecording); + TestFlowCommand = Command(StartFlowTestAsync, () => !IsBusy && !_closing && !IsTestingFlow && !IsRecording && HasStandardVideo && FlowTestConfigProvider is not null); StopVideoCommand = Command(async () => { await Playback.StopAsync(); EndFlowTest("测试已停止"); Status = "视频播放已停止"; }, () => !IsBusy && !_closing && Playback.IsLoaded); PreviousVideoFrameCommand = Command(() => Playback.StepFrameAsync(-1), () => CanSeekVideo && !_closing && !Playback.IsSeeking); NextVideoFrameCommand = Command(() => Playback.StepFrameAsync(1), () => CanSeekVideo && !_closing && !Playback.IsSeeking); @@ -133,24 +120,10 @@ public sealed partial class CameraViewModel : BindableBase } }; Playback.Failed += message => { EndFlowTest(message); Status = message; }; - BrowseCommand = Command(async () => - { - var picker = new OpenFolderDialog { Title = "选择录像保存目录" }; - if (Directory.Exists(SaveDirectory)) picker.InitialDirectory = SaveDirectory; - if (await picker.ShowDialogAsync() == true) { SaveDirectory = picker.FolderName; SaveSettings(); } - }, () => CanChangeDirectory); RevealCommand = Command(() => { - if (!string.IsNullOrEmpty(LastRecording) && File.Exists(LastRecording)) - { - DesktopPlatform.Reveal(LastRecording); - } - else - { - Directory.CreateDirectory(SaveDirectory); - var info = new ProcessStartInfo("explorer.exe") { UseShellExecute = true }; - info.ArgumentList.Add(Path.GetFullPath(SaveDirectory)); Process.Start(info); - } + Directory.CreateDirectory(SaveDirectory); + DesktopPlatform.Reveal(SaveDirectory); return Task.CompletedTask; }, () => !IsBusy && !_closing); _camera.FrameArrived += OnFrame; @@ -159,9 +132,8 @@ public sealed partial class CameraViewModel : BindableBase _timer = new DispatcherTimer(TimeSpan.FromMilliseconds(250), DispatcherPriority.Background, (_, _) => Tick(), _dispatcher); _timer.Start(); if (HasStandardVideo) { LastRecording = StandardVideoPath; RecordingInfo = "已有SOP流程视频"; Status = "已有标准视频,可播放、测试流程或导入视频替换"; } - if (SelectedCamera is null && !HasStandardVideo) Status = _sopStandard - ? "可导入标准视频,或先在运行设置中选择相机后录制" - : "请先在运行设置中选择相机,再开启录像预览"; + if (SelectedCamera is null && !HasStandardVideo) + Status = "可导入标准视频,或先在运行设置中选择相机后录制"; } private DelegateCommand Command(Func action, Func canExecute) @@ -180,7 +152,7 @@ public sealed partial class CameraViewModel : BindableBase private void UpdateCommands() { foreach (var command in _commands) command.RaiseCanExecuteChanged(); } private void StateChanged() { - RaisePropertyChanged(nameof(CanChangeDirectory)); RaisePropertyChanged(nameof(SelectedCameraName)); + RaisePropertyChanged(nameof(SelectedCameraName)); RaisePropertyChanged(nameof(PreviewButtonText)); UpdateCommands(); RaisePropertyChanged(nameof(PauseButtonText)); RaisePropertyChanged(nameof(HasStandardVideo)); RaisePropertyChanged(nameof(CanSeekVideo)); @@ -227,14 +199,11 @@ public sealed partial class CameraViewModel : BindableBase { if (IsRecording) return Task.CompletedTask; if (HasStandardVideo) throw new InvalidOperationException("已有SOP流程视频,请使用“重新录制”并确认删除旧视频"); - if (string.IsNullOrWhiteSpace(SaveDirectory)) throw new ArgumentException("请选择录像保存目录"); - var directory = Path.GetFullPath(SaveDirectory.Trim()); - SaveDirectory = directory; SaveSettings(); lock (_frames) { if (_latest == null || !_camera.IsGrabbing) throw new InvalidOperationException("尚未收到相机画面,请先开启预览"); if (Stopwatch.GetElapsedTime(_lastFrameTick).TotalSeconds > 2) throw new IOException("超过2秒未收到相机画面,请重新连接后再录像"); - LastRecording = _recorder.Start(directory, _latest, RecordingFps, _sopStandard ? "sop.avi" : null); + LastRecording = _recorder.Start(SaveDirectory, _latest, RecordingFps, "sop.avi"); } IsRecording = true; Status = "正在录像,最长5分钟;到时自动停止并保存"; Tick(); return Task.CompletedTask; @@ -261,20 +230,20 @@ public sealed partial class CameraViewModel : BindableBase if (!confirmed && resumeOnCancel && IsRecording && IsPaused) TogglePause(); } if (!confirmed) { Status = "已取消重新录制,原视频已保留"; return; } - // Do not delete until the camera is ready and the user has explicitly confirmed. + // 用户确认且相机仍有新帧后,才允许清除旧视频。 if (_closing || !_camera.IsGrabbing || !HasRecentFrame) throw new IOException("相机画面已中断,原视频保留,请重新连接后再试"); StopRecording(); await Playback.StopAsync(); - if (!SopHelper.Engine.Training.RecipeWorkspace.IsWithin(StandardVideoPath, _recipeRecordingDirectory!)) + if (!RecipeWorkspace.IsWithin(StandardVideoPath, SaveDirectory)) throw new IOException("SOP录像路径不在当前配方目录中"); File.Delete(StandardVideoPath); - SopHelper.Engine.Training.SopStandardVideoDuration.Remember(Path.GetDirectoryName(_recipeRecordingDirectory!)!, TimeSpan.Zero); + SopStandardVideoDuration.Remember(Path.GetDirectoryName(SaveDirectory)!, TimeSpan.Zero); LastRecording = ""; RecordingInfo = "未录像"; Status = "已清除旧视频,请点击“开始录像”进行重新录制"; StateChanged(); } - /// 结束编码并更新录像路径、时长和命令状态,标准录像与普通录像共用此收尾入口。 + /// 结束编码并更新录像路径、时长和命令状态。 private void StopRecording() { RecordingResult? result; @@ -284,12 +253,9 @@ public sealed partial class CameraViewModel : BindableBase { LastRecording = result.Path; RecordingInfo = $"已保存 · {result.Duration.TotalSeconds:F1} 秒 · {result.Frames} 帧"; - Status = _sopStandard ? "SOP流程视频已保存到当前配方的 sop_stand 目录" : "录像已保存,可在主窗口导入视频继续标注"; - if (_sopStandard) - { - try { SopHelper.Engine.Training.SopStandardVideoDuration.Remember(Path.GetDirectoryName(_recipeRecordingDirectory!)!, result.Duration); } - catch (Exception error) { Status += ";标准用时记忆保存失败:" + error.Message; } - } + Status = "SOP流程视频已保存到当前配方的 sop_stand 目录"; + try { SopStandardVideoDuration.Remember(Path.GetDirectoryName(SaveDirectory)!, result.Duration); } + catch (Exception error) { Status += ";标准用时记忆保存失败:" + error.Message; } } } /// 在采集线程处理录像及最新预览图缓存,界面属性通过调度器更新。 @@ -340,7 +306,7 @@ public sealed partial class CameraViewModel : BindableBase { if (!connected) Post(() => { - if (_camera.IsConnected) return; // Ignore a queued disconnect from the previous connection. + if (_camera.IsConnected) return; // 忽略上一次连接延迟送达的断开事件。 StopRecording(); IsPreviewing = false; if (!Playback.IsLoaded) ClearPreview(); }); @@ -399,22 +365,6 @@ public sealed partial class CameraViewModel : BindableBase lock (_frames) { _latest?.Dispose(); _latest = null; } Preview = null; } - internal static string ReadSaveDirectory(string root) - { - var path = Path.Combine(root, "workspace", "camera-settings.json"); - if (File.Exists(path)) - { - using var json = JsonDocument.Parse(File.ReadAllText(path)); - var directory = json.RootElement.GetProperty("directory").GetString(); - if (!string.IsNullOrWhiteSpace(directory)) return directory; - } - return Path.Combine(root, "workspace", "recordings"); - } - private void SaveSettings() - { - Directory.CreateDirectory(Path.GetDirectoryName(_settingsPath)!); - File.WriteAllText(_settingsPath, JsonSerializer.Serialize(new { directory = SaveDirectory })); - } public Task ShutdownAsync() => _shutdown ??= ShutdownCoreAsync(); /// 停止录像、回测和预览,解除事件订阅并释放此视图模型持有的资源。 private async Task ShutdownCoreAsync() diff --git a/src/SopHelper.Avalonia/Training/DesktopSequenceVisionClient.cs b/src/SopHelper.Avalonia/SopVideo/DesktopSequenceVisionClient.cs similarity index 95% rename from src/SopHelper.Avalonia/Training/DesktopSequenceVisionClient.cs rename to src/SopHelper.Avalonia/SopVideo/DesktopSequenceVisionClient.cs index ba6dd75..83816c2 100644 --- a/src/SopHelper.Avalonia/Training/DesktopSequenceVisionClient.cs +++ b/src/SopHelper.Avalonia/SopVideo/DesktopSequenceVisionClient.cs @@ -3,7 +3,7 @@ using System.Net.Http; using SopHelper.Engine.Sop; -namespace SopHelper.Training; +namespace SopHelper.SopVideo; /// 旧配置兼容占位;Agent只负责编写步骤,禁止用作判定模型。 public sealed class DesktopSequenceVisionClient(HttpClient http) : IVisionDecisionClient diff --git a/src/SopHelper.Avalonia/Training/FlowTestRegionOverlay.cs b/src/SopHelper.Avalonia/SopVideo/FlowTestRegionOverlay.cs similarity index 98% rename from src/SopHelper.Avalonia/Training/FlowTestRegionOverlay.cs rename to src/SopHelper.Avalonia/SopVideo/FlowTestRegionOverlay.cs index f57e8e2..dc53b23 100644 --- a/src/SopHelper.Avalonia/Training/FlowTestRegionOverlay.cs +++ b/src/SopHelper.Avalonia/SopVideo/FlowTestRegionOverlay.cs @@ -7,7 +7,7 @@ using Avalonia.Media; using Avalonia.VisualTree; using SopHelper.Engine.Sop; -namespace SopHelper.Training; +namespace SopHelper.SopVideo; /// 放在原始像素尺寸的画布中,与视频和手部骨架一起等比缩放。 public sealed class FlowTestRegionOverlay : Control diff --git a/src/SopHelper.Avalonia/Training/RecordedVideoPlayback.cs b/src/SopHelper.Avalonia/SopVideo/RecordedVideoPlayback.cs similarity index 99% rename from src/SopHelper.Avalonia/Training/RecordedVideoPlayback.cs rename to src/SopHelper.Avalonia/SopVideo/RecordedVideoPlayback.cs index 8f8681e..eb77a9f 100644 --- a/src/SopHelper.Avalonia/Training/RecordedVideoPlayback.cs +++ b/src/SopHelper.Avalonia/SopVideo/RecordedVideoPlayback.cs @@ -7,7 +7,7 @@ using Prism.Mvvm; using SopHelper.Presentation.Imaging; using SopHelper.Engine.Common; -namespace SopHelper.Training; +namespace SopHelper.SopVideo; /// 在后台解码录制的 AVI,界面线程只更新当前一帧。 public sealed class RecordedVideoPlayback : BindableBase diff --git a/src/SopHelper.Avalonia/Training/SopDraftReferenceVerifier.cs b/src/SopHelper.Avalonia/SopVideo/SopDraftReferenceVerifier.cs similarity index 99% rename from src/SopHelper.Avalonia/Training/SopDraftReferenceVerifier.cs rename to src/SopHelper.Avalonia/SopVideo/SopDraftReferenceVerifier.cs index 8937a1d..6ff10f8 100644 --- a/src/SopHelper.Avalonia/Training/SopDraftReferenceVerifier.cs +++ b/src/SopHelper.Avalonia/SopVideo/SopDraftReferenceVerifier.cs @@ -5,7 +5,7 @@ using OpenCvSharp; using SopHelper.Engine.Sop; using SopHelper.Engine.SopAgent; -namespace SopHelper.Training; +namespace SopHelper.SopVideo; /// 按草稿模式用同服务、同裁剪检查完成/前序参考;不替代手部触发及整轮回放。 public sealed class SopDraftReferenceVerifier(IVisionDecisionClient? vision = null) diff --git a/src/SopHelper.Avalonia/Training/SopDraftVideoVerifier.cs b/src/SopHelper.Avalonia/SopVideo/SopDraftVideoVerifier.cs similarity index 99% rename from src/SopHelper.Avalonia/Training/SopDraftVideoVerifier.cs rename to src/SopHelper.Avalonia/SopVideo/SopDraftVideoVerifier.cs index 9f89be0..cb66543 100644 --- a/src/SopHelper.Avalonia/Training/SopDraftVideoVerifier.cs +++ b/src/SopHelper.Avalonia/SopVideo/SopDraftVideoVerifier.cs @@ -5,7 +5,7 @@ using OpenCvSharp; using SopHelper.Engine.Sop; using SopHelper.Engine.SopAgent; -namespace SopHelper.Training; +namespace SopHelper.SopVideo; public interface ISopDraftVideoVerifier { diff --git a/src/SopHelper.Avalonia/Training/SopVideoFlowTest.cs b/src/SopHelper.Avalonia/SopVideo/SopVideoFlowTest.cs similarity index 99% rename from src/SopHelper.Avalonia/Training/SopVideoFlowTest.cs rename to src/SopHelper.Avalonia/SopVideo/SopVideoFlowTest.cs index abecf11..b3eb6c3 100644 --- a/src/SopHelper.Avalonia/Training/SopVideoFlowTest.cs +++ b/src/SopHelper.Avalonia/SopVideo/SopVideoFlowTest.cs @@ -6,7 +6,7 @@ using SopHelper.Engine.Common; using SopHelper.Engine.Inference; using SopHelper.Engine.Sop; -namespace SopHelper.Training; +namespace SopHelper.SopVideo; /// 独立的录像测试轮次,使用生产 SOP 引擎,不影响运行页统计。 public sealed class SopVideoFlowTest : IDisposable diff --git a/src/SopHelper.Avalonia/Training/CameraWindow.axaml b/src/SopHelper.Avalonia/Training/CameraWindow.axaml deleted file mode 100644 index b88247f..0000000 --- a/src/SopHelper.Avalonia/Training/CameraWindow.axaml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -