实现了多画布下,节点的复制粘贴功能

This commit is contained in:
fengjiayi
2025-05-27 18:32:40 +08:00
parent 7ad6041be6
commit 7848af0363
53 changed files with 1187 additions and 499 deletions

View File

@@ -1,6 +1,7 @@
using Serein.Library;
using Serein.Library.Api;
using Serein.Library.Utils;
using Serein.Workbench.Tool;
using System.Windows;
using System.Windows.Controls;
@@ -137,11 +138,11 @@ namespace Serein.Workbench.Themes
treeViewItem.Expanded += TreeViewItem_Expanded;
var contextMenu = new ContextMenu();
contextMenu.Items.Add(MainWindow.CreateMenuItem("从此节点执行", async (s, e) =>
contextMenu.Items.Add(WpfFuncTool.CreateMenuItem("从此节点执行", async (s, e) =>
{
try
{
await flowEnvironment.StartAsyncInSelectNode(tmpNodeTreeModel.RootNode.Guid);
await flowEnvironment.StartFlowFromSelectNodeAsync(tmpNodeTreeModel.RootNode.Guid);
}
catch (Exception ex)
{
@@ -149,7 +150,7 @@ namespace Serein.Workbench.Themes
return;
}
}));
contextMenu.Items.Add(MainWindow.CreateMenuItem("定位", (s, e) => flowEnvironment.NodeLocated(tmpNodeTreeModel.RootNode.Guid)));
contextMenu.Items.Add(WpfFuncTool.CreateMenuItem("定位", (s, e) => flowEnvironment.NodeLocated(tmpNodeTreeModel.RootNode.Guid)));
treeViewItem.ContextMenu = contextMenu;
treeViewItem.Margin = new Thickness(-20, 0, 0, 0);

View File

@@ -1,6 +1,7 @@
using Newtonsoft.Json.Linq;
using Serein.Library.Api;
using Serein.Library.Utils.SereinExpression;
using Serein.Workbench.Tool;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -294,7 +295,7 @@ namespace Serein.Workbench.Themes
// 配置右键菜单
var contextMenu = new ContextMenu();
contextMenu.Items.Add(MainWindow.CreateMenuItem($"表达式", (s, e) =>
contextMenu.Items.Add(WpfFuncTool.CreateMenuItem($"表达式", (s, e) =>
{
ExpressionTextBox.Text = subPath; // 获取表达式

View File

@@ -1,4 +1,5 @@
using System;
using Serein.Workbench.Tool;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
@@ -165,7 +166,7 @@ namespace Serein.Workbench.Themes
{
isChange = true;
contextMenu = new ContextMenu();
contextMenu.Items.Add(MainWindow.CreateMenuItem($"取值表达式", (s, e) =>
contextMenu.Items.Add(WpfFuncTool.CreateMenuItem($"取值表达式", (s, e) =>
{
string fullPath = GetNodeFullPath(memberNode);
string copyValue = "@Get " + fullPath;
@@ -181,7 +182,7 @@ namespace Serein.Workbench.Themes
{
isChange = true;
contextMenu = new ContextMenu();
contextMenu.Items.Add(MainWindow.CreateMenuItem($"取值表达式", (s, e) =>
contextMenu.Items.Add(WpfFuncTool.CreateMenuItem($"取值表达式", (s, e) =>
{
string fullPath = GetNodeFullPath(memberNode);
string copyValue = "@Get " + fullPath;