2024-10-23 19:22:27 +08:00
|
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:local="clr-namespace:Serein.Workbench.Themes"
|
|
|
|
|
xmlns:view="clr-namespace:Serein.Workbench.Node.View"
|
|
|
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib" >
|
2024-08-05 10:11:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type local:MethodDetailsControl}">
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type local:MethodDetailsControl}">
|
2024-10-20 12:10:57 +08:00
|
|
|
<!--根据方法入参数量生成相应的控件-->
|
2024-10-13 19:36:45 +08:00
|
|
|
<ItemsControl ItemsSource="{Binding MethodDetails.ParameterDetailss, RelativeSource={RelativeSource TemplatedParent}}">
|
2024-08-05 10:11:58 +08:00
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
2024-10-27 00:54:10 +08:00
|
|
|
<Grid Background="#E3FDFD" >
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="auto"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<view:ArgJunctionControl x:Name="ArgJunctionControl" Grid.Column="0" ArgIndex="{Binding Index}" MyNode="{Binding NodeModel}" />
|
|
|
|
|
<ContentControl Content="{Binding}" Grid.Column="1">
|
2024-08-05 10:11:58 +08:00
|
|
|
<ContentControl.Style>
|
|
|
|
|
<Style TargetType="ContentControl">
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<MultiDataTrigger>
|
2024-10-20 12:10:57 +08:00
|
|
|
<!--无须指定参数-->
|
2024-08-05 10:11:58 +08:00
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
|
|
<Condition Binding="{Binding IsExplicitData}" Value="false" />
|
|
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
|
|
<Setter Property="ContentTemplate">
|
|
|
|
|
<Setter.Value>
|
2024-10-27 00:54:10 +08:00
|
|
|
<DataTemplate>
|
|
|
|
|
<Grid>
|
2024-10-24 23:32:43 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="50"/>
|
|
|
|
|
<ColumnDefinition Width="30"/>
|
|
|
|
|
<ColumnDefinition Width="50"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding Index,StringFormat=agr{0}}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
<CheckBox Grid.Column="1" IsChecked="{Binding IsExplicitData, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center"/>
|
|
|
|
|
<TextBlock Grid.Column="2" MinWidth="50" Text="{Binding Name}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
|
|
|
|
<TextBlock Grid.Column="3" MinWidth="50" Text="无须指定参数"/>
|
|
|
|
|
</Grid>
|
2024-10-27 00:54:10 +08:00
|
|
|
|
2024-10-24 23:32:43 +08:00
|
|
|
|
2024-08-05 10:11:58 +08:00
|
|
|
</DataTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</MultiDataTrigger>
|
2024-10-24 23:32:43 +08:00
|
|
|
|
2024-10-20 12:10:57 +08:00
|
|
|
<!--指定参数:选项类型-->
|
2024-08-05 10:11:58 +08:00
|
|
|
<MultiDataTrigger>
|
|
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
|
|
<Condition Binding="{Binding IsExplicitData}" Value="true" />
|
|
|
|
|
<Condition Binding="{Binding ExplicitTypeName}" Value="Select" />
|
|
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
|
|
<Setter Property="ContentTemplate">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<DataTemplate>
|
2024-10-24 23:32:43 +08:00
|
|
|
<StackPanel Orientation="Horizontal">
|
2024-10-27 00:54:10 +08:00
|
|
|
<!--<view:ArgJunctionControl x:Name="ArgJunctionControl" Grid.Column="0" ArgIndex="{Binding Index}" MyNode="{Binding NodeModel}" />-->
|
|
|
|
|
<Grid>
|
2024-10-24 23:32:43 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="50"/>
|
|
|
|
|
<ColumnDefinition Width="30"/>
|
|
|
|
|
<ColumnDefinition Width="50"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding Index,StringFormat=agr{0}}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
<CheckBox Grid.Column="1" IsChecked="{Binding IsExplicitData, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center"/>
|
|
|
|
|
<TextBlock Grid.Column="2" MinWidth="50" Text="{Binding Name}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
|
|
|
|
<ComboBox Grid.Column="3"
|
2024-08-05 10:11:58 +08:00
|
|
|
MinWidth="50"
|
|
|
|
|
ItemsSource="{Binding Items}"
|
|
|
|
|
SelectedItem="{Binding DataValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
2024-10-24 23:32:43 +08:00
|
|
|
</Grid>
|
|
|
|
|
</StackPanel>
|
2024-08-05 10:11:58 +08:00
|
|
|
</DataTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</MultiDataTrigger>
|
2024-10-20 12:10:57 +08:00
|
|
|
<!--指定参数:文本类型(可输入)-->
|
2024-08-05 10:11:58 +08:00
|
|
|
<MultiDataTrigger>
|
|
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
|
|
<Condition Binding="{Binding IsExplicitData}" Value="true" />
|
|
|
|
|
<Condition Binding="{Binding ExplicitTypeName}" Value="Value" />
|
|
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
|
|
<Setter Property="ContentTemplate">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<DataTemplate>
|
2024-10-24 23:32:43 +08:00
|
|
|
<StackPanel Orientation="Horizontal">
|
2024-10-27 00:54:10 +08:00
|
|
|
<!--<view:ArgJunctionControl x:Name="ArgJunctionControl" Grid.Column="0" ArgIndex="{Binding Index}" MyNode="{Binding NodeModel}" />-->
|
|
|
|
|
<Grid>
|
2024-10-24 23:32:43 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="50"/>
|
|
|
|
|
<ColumnDefinition Width="30"/>
|
|
|
|
|
<ColumnDefinition Width="50"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding Index,StringFormat=agr{0}}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
<CheckBox Grid.Column="1" IsChecked="{Binding IsExplicitData, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center"/>
|
|
|
|
|
<TextBlock Grid.Column="2" MinWidth="50" Text="{Binding Name}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
|
|
|
|
<TextBox Grid.Column="3" MinWidth="50" Text="{Binding DataValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</StackPanel>
|
2024-08-05 10:11:58 +08:00
|
|
|
</DataTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</MultiDataTrigger>
|
|
|
|
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</ContentControl.Style>
|
|
|
|
|
</ContentControl>
|
2024-10-27 00:54:10 +08:00
|
|
|
</Grid>
|
2024-08-05 10:11:58 +08:00
|
|
|
</DataTemplate>
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
</ResourceDictionary>
|