diff --git a/XP.Hardware.Detector/bin/Debug/net8.0-windows7.0/XP.Hardware.Detector.deps.json b/XP.Hardware.Detector/bin/Debug/net8.0-windows7.0/XP.Hardware.Detector.deps.json index 54eff8d..3f740dc 100644 --- a/XP.Hardware.Detector/bin/Debug/net8.0-windows7.0/XP.Hardware.Detector.deps.json +++ b/XP.Hardware.Detector/bin/Debug/net8.0-windows7.0/XP.Hardware.Detector.deps.json @@ -1878,10 +1878,7 @@ "Telerik.UI.for.Wpf.NetCore.Xaml": "2024.1.408" }, "runtime": { - "XP.Common.dll": { - "assemblyVersion": "1.4.16.1", - "fileVersion": "1.4.16.1" - } + "XP.Common.dll": {} }, "resources": { "en-US/XP.Common.resources.dll": { diff --git a/XplorePlane.Tests/XplorePlane.Tests.csproj b/XplorePlane.Tests/XplorePlane.Tests.csproj index ae65b4a..c55372f 100644 --- a/XplorePlane.Tests/XplorePlane.Tests.csproj +++ b/XplorePlane.Tests/XplorePlane.Tests.csproj @@ -34,11 +34,4 @@ - - - ..\XplorePlane\Libs\ImageProcessing\ImageProcessing.Core.dll - True - - - diff --git a/XplorePlane/GapInspect.ico b/XplorePlane/GapInspect.ico deleted file mode 100644 index 53ae163..0000000 Binary files a/XplorePlane/GapInspect.ico and /dev/null differ diff --git a/XplorePlane/ViewModels/Main/MainViewModel.cs b/XplorePlane/ViewModels/Main/MainViewModel.cs index 448552b..2a97744 100644 --- a/XplorePlane/ViewModels/Main/MainViewModel.cs +++ b/XplorePlane/ViewModels/Main/MainViewModel.cs @@ -1,4 +1,4 @@ -using Prism.Commands; +using Prism.Commands; using Prism.Events; using Prism.Ioc; using Prism.Mvvm; @@ -10,6 +10,8 @@ using System.IO; using System.Windows; using System.Windows.Media.Imaging; using XplorePlane.Events; +using XplorePlane.Views; +using XplorePlane.Views.Cnc; using XP.Common.Logging.Interfaces; using XP.Common.PdfViewer.Interfaces; using XP.Hardware.MotionControl.Abstractions; @@ -62,6 +64,20 @@ namespace XplorePlane.ViewModels public DelegateCommand OpenLanguageSwitcherCommand { get; } public DelegateCommand OpenRealTimeLogViewerCommand { get; } + /// 右侧图像区域内容 | Right-side image panel content + public object ImagePanelContent + { + get => _imagePanelContent; + set => SetProperty(ref _imagePanelContent, value); + } + + /// 右侧图像区域宽度 | Right-side image panel width + public GridLength ImagePanelWidth + { + get => _imagePanelWidth; + set => SetProperty(ref _imagePanelWidth, value); + } + // 窗口引用(单例窗口防止重复打开) private Window _motionDebugWindow; private Window _detectorConfigWindow; @@ -69,6 +85,9 @@ namespace XplorePlane.ViewModels private Window _realTimeLogViewerWindow; private Window _toolboxWindow; private Window _raySourceConfigWindow; + private object _imagePanelContent; + private GridLength _imagePanelWidth = new GridLength(350); + private bool _isCncEditorMode; public MainViewModel(ILoggerService logger, IContainerProvider containerProvider, IEventAggregator eventAggregator) { @@ -90,7 +109,7 @@ namespace XplorePlane.ViewModels OpenImageProcessingCommand = new DelegateCommand(() => ShowWindow(new Views.ImageProcessingWindow(), "图像处理")); LoadImageCommand = new DelegateCommand(ExecuteLoadImage); OpenPipelineEditorCommand = new DelegateCommand(() => ShowWindow(new Views.PipelineEditorWindow(), "流水线编辑器")); - OpenCncEditorCommand = new DelegateCommand(() => ShowWindow(new Views.Cnc.CncEditorWindow(), "CNC 编辑器")); + OpenCncEditorCommand = new DelegateCommand(ExecuteOpenCncEditor); OpenMatrixEditorCommand = new DelegateCommand(() => ShowWindow(new Views.Cnc.MatrixEditorWindow(), "矩阵编排")); OpenToolboxCommand = new DelegateCommand(ExecuteOpenToolbox); OpenLibraryVersionsCommand = new DelegateCommand(() => ShowWindow(new Views.LibraryVersionsWindow(), "关于")); @@ -109,6 +128,9 @@ namespace XplorePlane.ViewModels OpenLanguageSwitcherCommand = new DelegateCommand(ExecuteOpenLanguageSwitcher); OpenRealTimeLogViewerCommand = new DelegateCommand(ExecuteOpenRealTimeLogViewer); + ImagePanelContent = new PipelineEditorView(); + ImagePanelWidth = new GridLength(350); + _logger.Info("MainViewModel 已初始化"); } @@ -153,6 +175,23 @@ namespace XplorePlane.ViewModels ShowOrActivate(_toolboxWindow, w => _toolboxWindow = w, () => new Views.OperatorToolboxWindow(), "算子工具箱"); } + private void ExecuteOpenCncEditor() + { + if (_isCncEditorMode) + { + ImagePanelContent = new PipelineEditorView(); + ImagePanelWidth = new GridLength(350); + _isCncEditorMode = false; + _logger.Info("已退出 CNC 编辑模式"); + return; + } + + ImagePanelContent = new CncPageView(); + ImagePanelWidth = new GridLength(430); + _isCncEditorMode = true; + _logger.Info("CNC 编辑器已切换到主界面图像区域"); + } + private void ExecuteOpenUserManual() { try diff --git a/XplorePlane/Views/Cnc/CncEditorWindow.xaml b/XplorePlane/Views/Cnc/CncEditorWindow.xaml index 0f00806..7496f51 100644 --- a/XplorePlane/Views/Cnc/CncEditorWindow.xaml +++ b/XplorePlane/Views/Cnc/CncEditorWindow.xaml @@ -1,12 +1,15 @@ - - \ No newline at end of file + diff --git a/XplorePlane/Views/Cnc/CncPageView.xaml b/XplorePlane/Views/Cnc/CncPageView.xaml index f16e760..cb9b5a3 100644 --- a/XplorePlane/Views/Cnc/CncPageView.xaml +++ b/XplorePlane/Views/Cnc/CncPageView.xaml @@ -1,32 +1,28 @@ - - - - Microsoft YaHei UI - -