mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
流程接口节点新增了对脚本节点的支持
This commit is contained in:
@@ -126,7 +126,7 @@ namespace Serein.Workbench
|
||||
filePath = @"C:\Users\Az\source\repos\CLBanyunqiState\CLBanyunqiState\bin\Release\banyunqi\project.dnf";
|
||||
filePath = @"F:\临时\project\project.dnf";
|
||||
filePath = @"F:\TempFile\flow\qrcode\project.dnf";
|
||||
filePath = @"F:\TempFile\flow\temp\project.dnf";
|
||||
filePath = @"F:\TempFile\flow\temp2\project.dnf";
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
string content = System.IO.File.ReadAllText(filePath); // 读取整个文件内容
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Serein.Workbench.Converters
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
<local:ExecuteJunctionControl Grid.Column="0" MyNode="{Binding NodeModel}" x:Name="ExecuteJunctionControl" HorizontalAlignment="Left" Grid.RowSpan="2"/>
|
||||
<StackPanel Grid.Column="1" Grid.RowSpan="2" Orientation="Horizontal">
|
||||
<TextBlock Text="[流程接口]" HorizontalAlignment="Center"/>
|
||||
|
||||
<TextBlock Text="{Binding NodeModel.DisplayName, Mode=TwoWay}" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
@@ -19,12 +19,14 @@ namespace Serein.Workbench.Node.View
|
||||
base.ViewModel = new FlowCallNodeControlViewModel(new SingleFlowCallNode(env));
|
||||
base.ViewModel.IsEnabledOnView = false;
|
||||
DataContext = base.ViewModel;
|
||||
base.ViewModel.NodeModel.DisplayName = "[流程接口]";
|
||||
InitializeComponent();
|
||||
}
|
||||
public FlowCallNodeControl(FlowCallNodeControlViewModel viewModel) : base(viewModel)
|
||||
{
|
||||
DataContext = viewModel;
|
||||
ViewModel = viewModel;
|
||||
viewModel.NodeModel.DisplayName = "[流程接口]";
|
||||
InitializeComponent();
|
||||
ViewModel.UploadMethodDetailsControl = UploadMethodDetailsControl;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<local:ExecuteJunctionControl Grid.Column="0" MyNode="{Binding NodeModel}" x:Name="ExecuteJunctionControl" HorizontalAlignment="Left" Grid.RowSpan="2"/>
|
||||
<Border Grid.Column="1" BorderThickness="1" HorizontalAlignment="Stretch">
|
||||
<TextBlock Text="脚本节点" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding NodeModel.DisplayName, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<local:NextStepJunctionControl Grid.Column="2" MyNode="{Binding NodeModel}" x:Name="NextStepJunctionControl" HorizontalAlignment="Right" Grid.RowSpan="2"/>
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
@@ -73,7 +74,18 @@
|
||||
<Border Grid.Column="2" BorderThickness="1">
|
||||
<local:ResultJunctionControl Grid.Column="2" MyNode="{Binding NodeModel}" x:Name="ResultJunctionControl" HorizontalAlignment="Right"/>
|
||||
</Border>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
<StackPanel Grid.Row="4" Background="Azure" Orientation="Horizontal" Margin="3">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox IsChecked="{Binding NodeModel.IsPublic, Mode=TwoWay}"/>
|
||||
<TextBlock Text="全局公开"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!--<RichTextBox x:Name="richTextBox" VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
|
||||
|
||||
@@ -35,11 +35,13 @@ namespace Serein.Workbench.Node.View
|
||||
base.ViewModel = new ScriptNodeControlViewModel(new SingleScriptNode(env));
|
||||
base.ViewModel.IsEnabledOnView = false;
|
||||
base.DataContext = viewModel;
|
||||
viewModel.NodeModel.DisplayName = "[脚本节点]";
|
||||
InitializeComponent();
|
||||
}
|
||||
public ScriptNodeControl(ScriptNodeControlViewModel viewModel) : base(viewModel)
|
||||
{
|
||||
DataContext = viewModel;
|
||||
viewModel.NodeModel.DisplayName = "[脚本节点]";
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,9 @@ namespace Serein.Workbench.Node.ViewModel
|
||||
{
|
||||
var cts = new CancellationTokenSource();
|
||||
var result = await NodeModel.ExecutingAsync(new Library.DynamicContext(nodeModel.Env), cts.Token);
|
||||
var data = result.Value;
|
||||
cts.Cancel();
|
||||
SereinEnv.WriteLine(InfoType.INFO, result?.ToString());
|
||||
SereinEnv.WriteLine(InfoType.INFO, data?.ToString());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user