mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-28 12:06:34 +08:00
恢复WPF项目代码
This commit is contained in:
54
Workbench/Node/ViewModel/ConditionNodeControlViewModel.cs
Normal file
54
Workbench/Node/ViewModel/ConditionNodeControlViewModel.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using Serein.NodeFlow.Model;
|
||||
using Serein.Workbench.Node.View;
|
||||
|
||||
namespace Serein.Workbench.Node.ViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 条件节点
|
||||
/// </summary>
|
||||
public class ConditionNodeControlViewModel : NodeControlViewModelBase
|
||||
{
|
||||
public new SingleConditionNode NodeModel { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为自定义参数
|
||||
/// </summary>
|
||||
public bool IsCustomData
|
||||
{
|
||||
get => NodeModel.IsExplicitData;
|
||||
set { NodeModel.IsExplicitData = value; OnPropertyChanged(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 自定义参数值
|
||||
/// </summary>
|
||||
public string? CustomData
|
||||
{
|
||||
get => NodeModel.ExplicitData;
|
||||
set { NodeModel.ExplicitData = value ; OnPropertyChanged(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 表达式
|
||||
/// </summary>
|
||||
public string Expression
|
||||
{
|
||||
get => NodeModel.Expression;
|
||||
set { NodeModel.Expression = value; OnPropertyChanged(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 条件节点
|
||||
/// </summary>
|
||||
/// <param name="node"></param>
|
||||
public ConditionNodeControlViewModel(SingleConditionNode node) : base(node)
|
||||
{
|
||||
this.NodeModel = node;
|
||||
if(node is null)
|
||||
{
|
||||
IsCustomData = false;
|
||||
CustomData = "";
|
||||
Expression = "PASS";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user