mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-20 00:06:45 +08:00
重新优化了NodeModel类;从硬编码类型改为“注册/获取”的方式,为下一步解耦Workbench与节点UI做准备。
新增了“全局数据节点”;保存项目文件时,不同节点可以使用自定义数据保存自身独特的数据,不再借用“方法参数”。 重新设计了运行时的环境输出;增量式生成器现在可以选择在属性变更的前后时间点插入自定义代码;重写了加载项目、保存项目的方法。
This commit is contained in:
@@ -22,21 +22,36 @@ namespace Serein.Workbench.Node.View
|
||||
/// </summary>
|
||||
public partial class GlobalDataControl : NodeControlBase, INodeJunction
|
||||
{
|
||||
//private new GlobalDataNodeControlViewModel ViewModel => ViewModel;
|
||||
|
||||
public GlobalDataControl() : base()
|
||||
{
|
||||
// 窗体初始化需要
|
||||
ViewModel = new GlobalDataNodeControlViewModel(new SingleGlobalDataNode(null));
|
||||
base.ViewModel = new GlobalDataNodeControlViewModel(new SingleGlobalDataNode(null));
|
||||
DataContext = ViewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public GlobalDataControl(ConditionNodeControlViewModel viewModel) : base(viewModel)
|
||||
public GlobalDataControl(GlobalDataNodeControlViewModel viewModel) : base(viewModel)
|
||||
{
|
||||
DataContext = viewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置数据节点
|
||||
/// </summary>
|
||||
/// <param name="nodeControl"></param>
|
||||
public void SetDataNodeControl(NodeControlBase nodeControl)
|
||||
{
|
||||
((GlobalDataNodeControlViewModel)ViewModel).SetDataNode(nodeControl.ViewModel.NodeModel);
|
||||
|
||||
GlobalDataPanel.Children.Clear();
|
||||
GlobalDataPanel.Children.Add(nodeControl);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 入参控制点(可能有,可能没)
|
||||
/// </summary>
|
||||
@@ -50,13 +65,13 @@ namespace Serein.Workbench.Node.View
|
||||
/// <summary>
|
||||
/// 返回值控制点(可能有,可能没)
|
||||
/// </summary>
|
||||
JunctionControlBase INodeJunction.ReturnDataJunction => this.ResultJunctionControl;
|
||||
|
||||
JunctionControlBase INodeJunction.ReturnDataJunction => throw new NotImplementedException();
|
||||
|
||||
/// <summary>
|
||||
/// 方法入参控制点(可能有,可能没)
|
||||
/// </summary>
|
||||
JunctionControlBase[] INodeJunction.ArgDataJunction => throw new NotImplementedException();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user