mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-04 08:40:49 +08:00
修改了logwindows输出,避免高频输出时卡死。修改了流程运行上下文,使节点具备终止分支运行的能力。
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using Serein.NodeFlow.Model;
|
||||
using Serein.WorkBench.Node.View;
|
||||
|
||||
namespace Serein.WorkBench.Node.ViewModel
|
||||
{
|
||||
public class ActionNodeControlViewModel : NodeControlViewModelBase
|
||||
{
|
||||
private readonly SingleActionNode node;
|
||||
|
||||
public ActionNodeControlViewModel(SingleActionNode node):base(node)
|
||||
{
|
||||
this.node = node;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using Serein.NodeFlow.Model;
|
||||
using Serein.WorkBench.Node.View;
|
||||
|
||||
namespace Serein.WorkBench.Node.ViewModel
|
||||
{
|
||||
public class ConditionNodeControlViewModel : NodeControlViewModelBase
|
||||
{
|
||||
private readonly SingleConditionNode singleConditionNode;
|
||||
|
||||
/// <summary>
|
||||
/// 是否为自定义参数
|
||||
/// </summary>
|
||||
public bool IsCustomData
|
||||
{
|
||||
get => singleConditionNode.IsCustomData;
|
||||
set { singleConditionNode.IsCustomData= value; OnPropertyChanged(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 自定义参数值
|
||||
/// </summary>
|
||||
public object? CustomData
|
||||
{
|
||||
get => singleConditionNode.CustomData;
|
||||
set { singleConditionNode.CustomData = value ; OnPropertyChanged(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 表达式
|
||||
/// </summary>
|
||||
public string Expression
|
||||
{
|
||||
get => singleConditionNode.Expression;
|
||||
set { singleConditionNode.Expression = value; OnPropertyChanged(); }
|
||||
}
|
||||
|
||||
public ConditionNodeControlViewModel(SingleConditionNode node) : base(node)
|
||||
{
|
||||
this.singleConditionNode = node;
|
||||
//IsCustomData = false;
|
||||
//CustomData = "";
|
||||
//Expression = "PASS";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Serein.NodeFlow.Model;
|
||||
using Serein.WorkBench.Node.View;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Serein.WorkBench.Node.ViewModel
|
||||
{
|
||||
public class ConditionRegionNodeControlViewModel : NodeControlViewModelBase
|
||||
{
|
||||
public ConditionRegionNodeControlViewModel(CompositeConditionNode node):base(node)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
26
WorkBench.Remote/Node/ViewModel/ExpOpNodeViewModel.cs
Normal file
26
WorkBench.Remote/Node/ViewModel/ExpOpNodeViewModel.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Serein.NodeFlow.Model;
|
||||
using Serein.WorkBench.Node.View;
|
||||
|
||||
namespace Serein.WorkBench.Node.ViewModel
|
||||
{
|
||||
public class ExpOpNodeViewModel: NodeControlViewModelBase
|
||||
{
|
||||
public readonly SingleExpOpNode node;
|
||||
|
||||
public string Expression
|
||||
{
|
||||
get => node.Expression;
|
||||
set
|
||||
{
|
||||
node.Expression = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ExpOpNodeViewModel(SingleExpOpNode node) : base(node)
|
||||
{
|
||||
this.node = node;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Serein.NodeFlow.Model;
|
||||
using Serein.WorkBench.Node.View;
|
||||
|
||||
namespace Serein.WorkBench.Node.ViewModel
|
||||
{
|
||||
public class FlipflopNodeControlViewModel : NodeControlViewModelBase
|
||||
{
|
||||
private readonly SingleFlipflopNode node;
|
||||
public FlipflopNodeControlViewModel(SingleFlipflopNode node) : base(node)
|
||||
{
|
||||
this.node = node;
|
||||
}
|
||||
}
|
||||
}
|
||||
27
WorkBench.Remote/Node/ViewModel/TypeToStringConverter.cs
Normal file
27
WorkBench.Remote/Node/ViewModel/TypeToStringConverter.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Serein.WorkBench.Node.ViewModel
|
||||
{
|
||||
public class TypeToStringConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is Type type)
|
||||
{
|
||||
return type.ToString();
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user