From 2ec0f0b254b93e88f93075065c42c96b04df754a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= Date: Mon, 27 Apr 2026 19:17:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=88=E5=B9=B6=E5=90=8E?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF=EF=BC=9A=E8=A1=A5=E5=85=A8?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E7=9A=84=E5=B1=9E=E6=80=A7=E5=A3=B0=E6=98=8E?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8Dregion=E6=8C=87=E4=BB=A4=E4=B8=8D?= =?UTF-8?q?=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- XplorePlane/ViewModels/Main/MainViewModel.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/XplorePlane/ViewModels/Main/MainViewModel.cs b/XplorePlane/ViewModels/Main/MainViewModel.cs index 7d494ba..5d5cdc7 100644 --- a/XplorePlane/ViewModels/Main/MainViewModel.cs +++ b/XplorePlane/ViewModels/Main/MainViewModel.cs @@ -99,6 +99,22 @@ namespace XplorePlane.ViewModels // 设置命令 public DelegateCommand OpenLanguageSwitcherCommand { get; } public DelegateCommand OpenRealTimeLogViewerCommand { get; } + public DelegateCommand UseLiveDetectorSourceCommand { get; } + + public bool IsMainViewportRealtimeEnabled + { + get => _mainViewportService.IsRealtimeDisplayEnabled; + set + { + if (_mainViewportService.IsRealtimeDisplayEnabled == value) + return; + + _mainViewportService.SetRealtimeDisplayEnabled(value); + RaisePropertyChanged(); + } + } + + public bool IsUsingLiveDetectorSource => _mainViewportService.CurrentSourceMode == MainViewportSourceMode.LiveDetector; /// 右侧图像区域内容 | Right-side image panel content public object ImagePanelContent @@ -447,8 +463,6 @@ namespace XplorePlane.ViewModels } } - #endregion - #region 测量命令实现 private bool CheckImageLoaded() @@ -615,5 +629,7 @@ namespace XplorePlane.ViewModels RaisePropertyChanged(nameof(IsUsingLiveDetectorSource)); })); } + + #endregion } }