mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-24 17:06:34 +08:00
设计了流程接口节点,能够切换本节点数据、目标节点数据,目前还有数据来源相关操作没有实现
This commit is contained in:
@@ -102,6 +102,7 @@ namespace Serein.Workbench.Services
|
||||
/// 当前所有画布
|
||||
/// </summary>
|
||||
public FlowCanvasView[] FlowCanvass => Canvass.Select(c => c.Value).ToArray();
|
||||
public NodeControlBase[] FlowNodeControls => NodeControls.Select(c => c.Value).ToArray();
|
||||
|
||||
/// <summary>
|
||||
/// 记录流程画布
|
||||
@@ -145,10 +146,10 @@ namespace Serein.Workbench.Services
|
||||
flowEnvironment.NodeMVVMManagement.RegisterUI(NodeControlType.Flipflop, typeof(FlipflopNodeControl), typeof(FlipflopNodeControlViewModel));
|
||||
flowEnvironment.NodeMVVMManagement.RegisterUI(NodeControlType.ExpOp, typeof(ExpOpNodeControl), typeof(ExpOpNodeControlViewModel));
|
||||
flowEnvironment.NodeMVVMManagement.RegisterUI(NodeControlType.ExpCondition, typeof(ConditionNodeControl), typeof(ConditionNodeControlViewModel));
|
||||
//flowEnvironment.NodeMVVMManagement.RegisterUI(NodeControlType.ConditionRegion, typeof(ConditionRegionControl), typeof(ConditionRegionNodeControlViewModel));
|
||||
flowEnvironment.NodeMVVMManagement.RegisterUI(NodeControlType.GlobalData, typeof(GlobalDataControl), typeof(GlobalDataNodeControlViewModel));
|
||||
flowEnvironment.NodeMVVMManagement.RegisterUI(NodeControlType.Script, typeof(ScriptNodeControl), typeof(ScriptNodeControlViewModel));
|
||||
flowEnvironment.NodeMVVMManagement.RegisterUI(NodeControlType.NetScript, typeof(NetScriptNodeControl), typeof(NetScriptNodeControlViewModel));
|
||||
flowEnvironment.NodeMVVMManagement.RegisterUI(NodeControlType.FlowCall, typeof(FlowCallNodeControl), typeof(FlowCallNodeControlViewModel));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -301,6 +302,11 @@ namespace Serein.Workbench.Services
|
||||
}
|
||||
#endregion
|
||||
|
||||
//if (nodeModel.ControlType == NodeControlType.FlowCall)
|
||||
//{
|
||||
// Console.WriteLine("test");
|
||||
//}
|
||||
|
||||
#region 创建控件
|
||||
|
||||
NodeControlBase nodeControl;
|
||||
@@ -335,6 +341,7 @@ namespace Serein.Workbench.Services
|
||||
SereinEnv.WriteLine(InfoType.INFO, $"无法移除画布,画布不存在。");
|
||||
return;
|
||||
}
|
||||
Canvass.Remove(eventArgs.CanvasGuid);
|
||||
OnRemoveFlowCanvasView.Invoke(nodeCanvas);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Serein.Workbench.Services
|
||||
{
|
||||
@@ -56,16 +57,25 @@ namespace Serein.Workbench.Services
|
||||
|
||||
private readonly IFlowEnvironment flowEnvironment;
|
||||
private readonly IFlowEEForwardingService flowEEForwardingService;
|
||||
private readonly IKeyEventService keyEventService;
|
||||
private readonly FlowNodeService flowNodeService;
|
||||
|
||||
/// <summary>
|
||||
/// 管理工作台的事件
|
||||
/// </summary>
|
||||
/// <param name="flowEnvironment"></param>
|
||||
/// <param name="flowEEForwardingService"></param>
|
||||
public WorkbenchEventService(IFlowEnvironment flowEnvironment, IFlowEEForwardingService flowEEForwardingService)
|
||||
/// <param name="keyEventService"></param>
|
||||
/// <param name="flowNodeService"></param>
|
||||
public WorkbenchEventService(IFlowEnvironment flowEnvironment,
|
||||
IFlowEEForwardingService flowEEForwardingService,
|
||||
IKeyEventService keyEventService,
|
||||
FlowNodeService flowNodeService)
|
||||
{
|
||||
this.flowEnvironment = flowEnvironment;
|
||||
this.flowEEForwardingService = flowEEForwardingService;
|
||||
this.keyEventService = keyEventService;
|
||||
this.flowNodeService = flowNodeService;
|
||||
InitEvents();
|
||||
}
|
||||
|
||||
@@ -73,6 +83,12 @@ namespace Serein.Workbench.Services
|
||||
{
|
||||
flowEEForwardingService.OnProjectSaving += SaveProjectToLocalFile;
|
||||
flowEEForwardingService.OnEnvOut += FlowEEForwardingService_OnEnvOut;
|
||||
keyEventService.OnKeyDown += KeyEventService_OnKeyDown; ;
|
||||
}
|
||||
|
||||
private void KeyEventService_OnKeyDown(System.Windows.Input.Key key)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void FlowEEForwardingService_OnEnvOut(InfoType type, string value)
|
||||
|
||||
Reference in New Issue
Block a user