2025-05-28 23:19:00 +08:00
|
|
|
|
using Serein.Library.Api;
|
|
|
|
|
|
using Serein.NodeFlow.Model;
|
2025-01-05 08:52:37 +08:00
|
|
|
|
using Serein.Workbench.Node.ViewModel;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Serein.Workbench.Node.View
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// ConditionNode.xaml 的交互逻辑
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public partial class ConditionNodeControl : NodeControlBase, INodeJunction
|
|
|
|
|
|
{
|
|
|
|
|
|
public ConditionNodeControl() : base()
|
|
|
|
|
|
{
|
2025-05-28 23:19:00 +08:00
|
|
|
|
|
2025-01-05 08:52:37 +08:00
|
|
|
|
// 窗体初始化需要
|
2025-05-28 23:19:00 +08:00
|
|
|
|
var env = App.GetService<IFlowEnvironment>();
|
|
|
|
|
|
base.ViewModel = new ConditionNodeControlViewModel (new SingleConditionNode(env));
|
2025-03-17 10:14:18 +08:00
|
|
|
|
base.ViewModel.IsEnabledOnView = false;
|
2025-01-05 08:52:37 +08:00
|
|
|
|
DataContext = ViewModel;
|
2025-05-30 23:31:31 +08:00
|
|
|
|
base.ViewModel.NodeModel.DisplayName = "[条件节点]";
|
2025-01-05 08:52:37 +08:00
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public ConditionNodeControl(ConditionNodeControlViewModel viewModel):base(viewModel)
|
|
|
|
|
|
{
|
|
|
|
|
|
DataContext = viewModel;
|
2025-05-30 23:31:31 +08:00
|
|
|
|
viewModel.NodeModel.DisplayName = "[条件节点]";
|
2025-01-05 08:52:37 +08:00
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 入参控制点(可能有,可能没)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
JunctionControlBase INodeJunction.ExecuteJunction => this.ExecuteJunctionControl;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 下一个调用方法控制点(可能有,可能没)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
JunctionControlBase INodeJunction.NextStepJunction => this.NextStepJunctionControl;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 返回值控制点(可能有,可能没)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
JunctionControlBase INodeJunction.ReturnDataJunction => this.ResultJunctionControl;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 方法入参控制点(可能有,可能没)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private JunctionControlBase[] argDataJunction;
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 方法入参控制点(可能有,可能没)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
JunctionControlBase[] INodeJunction.ArgDataJunction
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
argDataJunction = new JunctionControlBase[1];
|
|
|
|
|
|
argDataJunction[0] = this.ArgJunctionControl;
|
|
|
|
|
|
return argDataJunction;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|