设计了流程接口节点,能够切换本节点数据、目标节点数据,目前还有数据来源相关操作没有实现

This commit is contained in:
fengjiayi
2025-05-28 23:19:00 +08:00
parent f7cae3493f
commit a5715be929
44 changed files with 1064 additions and 277 deletions

View File

@@ -18,8 +18,7 @@ namespace Serein.Workbench.Node.View
InitializeComponent();
if(ExecuteJunctionControl.MyNode != null)
{
ExecuteJunctionControl.MyNode.Guid = viewModel.NodeModel.Guid;
ExecuteJunctionControl.MyNode.Guid = viewModel.NodeModel.Guid;
}
}
@@ -38,46 +37,40 @@ namespace Serein.Workbench.Node.View
/// </summary>
JunctionControlBase INodeJunction.ReturnDataJunction => this.ResultJunctionControl;
/// <summary>
/// 方法入参控制点(可能有,可能没)
/// </summary>
JunctionControlBase[] INodeJunction.ArgDataJunction
{
get
{
// 获取 MethodDetailsControl 实例
var methodDetailsControl = this.MethodDetailsControl;
var itemsControl = FindVisualChild<ItemsControl>(methodDetailsControl); // 查找 ItemsControl
if (itemsControl != null)
{
var argDataJunction = new JunctionControlBase[base.ViewModel.NodeModel.MethodDetails.ParameterDetailss.Length];
var controls = new List<JunctionControlBase>();
JunctionControlBase[] INodeJunction.ArgDataJunction => GetArgJunction();
for (int i = 0; i < itemsControl.Items.Count; i++)
private JunctionControlBase[] GetArgJunction()
{
// 获取 MethodDetailsControl 实例
var methodDetailsControl = this.MethodDetailsControl;
var itemsControl = FindVisualChild<ItemsControl>(methodDetailsControl); // 查找 ItemsControl
if (itemsControl != null)
{
var argDataJunction = new JunctionControlBase[base.ViewModel.NodeModel.MethodDetails.ParameterDetailss.Length];
var controls = new List<JunctionControlBase>();
for (int i = 0; i < itemsControl.Items.Count; i++)
{
var container = itemsControl.ItemContainerGenerator.ContainerFromIndex(i) as FrameworkElement;
if (container != null)
{
var container = itemsControl.ItemContainerGenerator.ContainerFromIndex(i) as FrameworkElement;
if (container != null)
var argControl = FindVisualChild<ArgJunctionControl>(container);
if (argControl != null)
{
var argControl = FindVisualChild<ArgJunctionControl>(container);
if (argControl != null)
{
controls.Add(argControl); // 收集 ArgJunctionControl 实例
}
controls.Add(argControl); // 收集 ArgJunctionControl 实例
}
}
return argDataJunction = controls.ToArray();
}
else
{
return [];
}
return argDataJunction = controls.ToArray();
}
return [];
}
}
}