#0031 新增打开图像工具箱

This commit is contained in:
zhengxuan.zhang
2026-03-16 17:12:51 +08:00
parent 140153d449
commit 3f89710850
5 changed files with 53 additions and 7 deletions
@@ -56,10 +56,13 @@ namespace XplorePlane.ViewModels
SaveAsPipelineCommand = new DelegateCommand(async () => await SaveAsPipelineAsync());
DeletePipelineCommand = new DelegateCommand(async () => await DeletePipelineAsync());
LoadPipelineCommand = new DelegateCommand(async () => await LoadPipelineAsync());
OpenToolboxCommand = new DelegateCommand(OpenToolbox);
MoveNodeUpCommand = new DelegateCommand<PipelineNodeViewModel>(MoveNodeUp);
MoveNodeDownCommand = new DelegateCommand<PipelineNodeViewModel>(MoveNodeDown);
}
// ── State Properties ──────────────────────────────────────────
public ObservableCollection<PipelineNodeViewModel> PipelineNodes { get; }
@@ -137,6 +140,9 @@ namespace XplorePlane.ViewModels
public DelegateCommand SaveAsPipelineCommand { get; }
public DelegateCommand DeletePipelineCommand { get; }
public DelegateCommand LoadPipelineCommand { get; }
public DelegateCommand OpenToolboxCommand { get; }
public DelegateCommand<PipelineNodeViewModel> MoveNodeUpCommand { get; }
public DelegateCommand<PipelineNodeViewModel> MoveNodeDownCommand { get; }
@@ -461,6 +467,26 @@ namespace XplorePlane.ViewModels
}
}
private void OpenToolbox() //打开图像工具箱
{
Serilog.Log.Information("OpenToolbox 被调用");
try
{
var window = new Views.OperatorToolboxWindow
{
Owner = System.Windows.Application.Current.MainWindow
};
Serilog.Log.Information("OperatorToolboxWindow 已创建,准备 Show()");
window.Show();
Serilog.Log.Information("OperatorToolboxWindow.Show() 完成");
}
catch (Exception ex)
{
Serilog.Log.Error(ex, "OpenToolbox 打开窗口失败");
}
}
private PipelineModel BuildPipelineModel()
{
return new PipelineModel