2025-01-05 08:52:37 +08:00
|
|
|
<local:NodeControlBase x:Class="Serein.Workbench.Node.View.ScriptNodeControl"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:local="clr-namespace:Serein.Workbench.Node.View"
|
|
|
|
|
xmlns:vm="clr-namespace:Serein.Workbench.Node.ViewModel"
|
|
|
|
|
xmlns:themes="clr-namespace:Serein.Workbench.Themes"
|
2025-07-16 16:16:19 +08:00
|
|
|
xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
|
2025-01-05 08:52:37 +08:00
|
|
|
d:DataContext="{d:DesignInstance vm:ScriptNodeControlViewModel}"
|
|
|
|
|
mc:Ignorable="d"
|
2025-07-31 09:54:30 +08:00
|
|
|
MaxWidth="500">
|
2025-03-18 11:52:54 +08:00
|
|
|
|
2025-01-05 08:52:37 +08:00
|
|
|
<Grid Background="#FEFAF4">
|
|
|
|
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="0" Background="#E7EFF5" >
|
|
|
|
|
<!--<Grid Grid.Row="0" >-->
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="auto"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="auto"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
2025-07-13 17:34:03 +08:00
|
|
|
<local:ExecuteJunctionControl Grid.Column="0" NodeViewModel="{Binding}" x:Name="ExecuteJunctionControl" HorizontalAlignment="Left" Grid.RowSpan="2"/>
|
2025-01-05 08:52:37 +08:00
|
|
|
<Border Grid.Column="1" BorderThickness="1" HorizontalAlignment="Stretch">
|
2025-05-30 15:42:59 +08:00
|
|
|
<TextBlock Text="{Binding NodeModel.DisplayName, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
2025-01-05 08:52:37 +08:00
|
|
|
</Border>
|
2025-07-13 17:34:03 +08:00
|
|
|
<local:NextStepJunctionControl Grid.Column="2" NodeViewModel="{Binding}" x:Name="NextStepJunctionControl" HorizontalAlignment="Right" Grid.RowSpan="2"/>
|
2025-01-05 08:52:37 +08:00
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="1" HorizontalAlignment="Stretch" Margin="4">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
2025-05-30 15:42:59 +08:00
|
|
|
<RowDefinition Height="*"/>
|
2025-01-05 08:52:37 +08:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal">
|
|
|
|
|
<TextBlock Text="脚本代码:" Margin="2" HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
|
|
|
|
|
|
|
|
|
|
<Button Content="加载" Margin="3,0,1,0" Command="{Binding CommandLoadScript}" Height="17.2"></Button>
|
|
|
|
|
<Button Content="执行" Margin="3,0,1,0" Command="{Binding CommandExecuting}" Height="17.2"></Button>
|
2025-07-26 19:36:54 +08:00
|
|
|
<Button Content="c#代码" Margin="3,0,1,0" Command="{Binding CommandGenerateCode}" Height="17.2"></Button>
|
2025-01-05 08:52:37 +08:00
|
|
|
</StackPanel>
|
2025-07-13 17:34:03 +08:00
|
|
|
<themes:MethodDetailsControl Grid.Row="1" x:Name="MethodDetailsControl" MethodDetails="{Binding NodeModel.MethodDetails}" NodeViewModel="{Binding}"/>
|
2025-07-16 16:16:19 +08:00
|
|
|
<!--<TextBox Grid.Row="2" MinHeight="20" MinWidth="100" TextWrapping="Wrap" AcceptsReturn="True" IsEnabled="{Binding IsEnabledOnView}" Text="{Binding Script}"></TextBox>-->
|
|
|
|
|
|
|
|
|
|
<avalonEdit:TextEditor Grid.Row="2"
|
|
|
|
|
x:Name="codeEditor"
|
|
|
|
|
FontFamily="Consolas"
|
|
|
|
|
FontSize="12"
|
|
|
|
|
SyntaxHighlighting="C#"
|
|
|
|
|
TextChanged="codeEditor_TextChanged"
|
|
|
|
|
ShowLineNumbers="True"
|
|
|
|
|
Margin="10"/>
|
|
|
|
|
|
2025-01-05 08:52:37 +08:00
|
|
|
<Grid Grid.Row="3" >
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="50"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="auto"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Border Grid.Column="0" BorderThickness="1">
|
|
|
|
|
<TextBlock Text="result ->" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
|
|
|
</Border>
|
|
|
|
|
<Border Grid.Column="1" BorderThickness="1">
|
2025-07-31 09:54:30 +08:00
|
|
|
<TextBlock Text="{Binding NodeModel.MethodDetails.ReturnType, Converter={StaticResource TypeNameDisplaynConverter}}" TextTrimming="CharacterEllipsis" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
2025-01-05 08:52:37 +08:00
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<Border Grid.Column="2" BorderThickness="1">
|
2025-07-13 17:34:03 +08:00
|
|
|
<local:ResultJunctionControl Grid.Column="2" NodeViewModel="{Binding}" x:Name="ResultJunctionControl" HorizontalAlignment="Right"/>
|
2025-01-05 08:52:37 +08:00
|
|
|
</Border>
|
2025-05-30 15:42:59 +08:00
|
|
|
|
|
|
|
|
|
2025-01-05 08:52:37 +08:00
|
|
|
</Grid>
|
2025-05-30 15:42:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="4" Background="Azure" Orientation="Horizontal" Margin="3">
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
<CheckBox IsChecked="{Binding NodeModel.IsPublic, Mode=TwoWay}"/>
|
|
|
|
|
<TextBlock Text="全局公开"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
2025-01-05 08:52:37 +08:00
|
|
|
<!--<RichTextBox x:Name="richTextBox" VerticalScrollBarVisibility="Auto"
|
|
|
|
|
HorizontalScrollBarVisibility="Auto"
|
|
|
|
|
|
|
|
|
|
TextChanged="RichTextBox_TextChanged"/>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Left">
|
|
|
|
|
<local:ResultJunctionControl Grid.Column="2" MyNode="{Binding NodelModel}" x:Name="ResultJunctionControl" HorizontalAlignment="Right"/>
|
|
|
|
|
<TextBlock Text="设置数据源" Margin="2" HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
|
|
|
|
|
</StackPanel>-->
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</local:NodeControlBase>
|