更改了节点控件的布局

This commit is contained in:
fengjiayi
2024-12-12 21:09:29 +08:00
parent 589c0490bf
commit c1ef7eb8e4
7 changed files with 62 additions and 40 deletions

View File

@@ -31,7 +31,7 @@ namespace Serein.Library
/// <summary>
/// 是否保护参数(目前仅视觉效果参数,不影响运行实现,后续将设置作用在运行逻辑中)
/// 是否保护参数
/// </summary>
[PropertyInfo(IsNotification = true)]
private bool _isProtectionParameter;

View File

@@ -106,6 +106,9 @@ namespace Serein.Library
ParameterData = parameterData.ToArray(),
ErrorNodes = errorNodes.ToArray(),
Position = Position,
IsProtectionParameter = this.MethodDetails.IsProtectionParameter,
IsInterrupt = this.DebugSetting.IsInterrupt,
IsEnable = this.DebugSetting.IsEnable,
};
nodeInfo = SaveCustomData(nodeInfo);
return nodeInfo;
@@ -130,6 +133,10 @@ namespace Serein.Library
this.Guid = nodeInfo.Guid;
this.Position = nodeInfo.Position ?? new PositionOfUI(0, 0);// 加载位置信息
var md = this.MethodDetails; // 当前节点的方法说明
this.MethodDetails.IsProtectionParameter = nodeInfo.IsProtectionParameter; // 保护参数
this.DebugSetting.IsInterrupt = nodeInfo.IsInterrupt; // 是否中断
this.DebugSetting.IsEnable = nodeInfo.IsEnable; // 是否使能
if (md != null)
{
if(md.ParameterDetailss == null)

View File

@@ -241,10 +241,23 @@ namespace Serein.Library
public PositionOfUI Position { get; set; }
/// <summary>
/// 是否选中(暂时无效)
/// 是否中断
/// </summary>
public bool IsSelect { get; set; }
public bool IsInterrupt { get; set; }
/// <summary>
/// 是否使能
/// </summary>
public bool IsEnable { get; set; }
/// <summary>
/// 是否保护参数
/// </summary>
public bool IsProtectionParameter { get; set; }
/// <summary>
/// 自定义数据

View File

@@ -16,7 +16,7 @@ namespace Serein.Workbench
{
#if DEBUG
if (1 == 11)
if (1 == 1)
{
// 这里是我自己的测试代码,你可以删除
string filePath;

View File

@@ -109,23 +109,24 @@
</Border>
</Grid>
<Grid Grid.Row="4" Background="Azure" >
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<CheckBox Grid.Row="0" Grid.Column="0" IsChecked="{Binding NodeModel.DebugSetting.IsEnable, Mode=TwoWay}"/>
<TextBlock Grid.Row="0" Grid.Column="1" Text="是否使能" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<CheckBox Grid.Row="1" Grid.Column="0" IsChecked="{Binding NodeModel.MethodDetails.IsProtectionParameter, Mode=TwoWay}"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text="参数保护" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<CheckBox Grid.Row="2" Grid.Column="0" IsChecked="{Binding NodeModel.DebugSetting.IsInterrupt, Mode=TwoWay}"/>
<TextBlock Grid.Row="2" Grid.Column="1" Text="中断节点" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</Grid>
<StackPanel Grid.Row="4" Background="Azure" Orientation="Horizontal" Margin="3">
<StackPanel Orientation="Horizontal" Margin="2,1,2,1">
<CheckBox IsChecked="{Binding NodeModel.DebugSetting.IsEnable, Mode=TwoWay}"/>
<TextBlock Text="是否使能" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="2,1,2,1">
<CheckBox IsChecked="{Binding NodeModel.MethodDetails.IsProtectionParameter, Mode=TwoWay}"/>
<TextBlock Text="参数保护" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="2,1,2,1">
<CheckBox IsChecked="{Binding NodeModel.DebugSetting.IsInterrupt, Mode=TwoWay}"/>
<TextBlock Text="中断节点" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</StackPanel>
</StackPanel>
</Grid>

View File

@@ -86,23 +86,24 @@
</Border>
</Grid>
<Grid Grid.Row="4" Background="Azure" >
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<CheckBox Grid.Row="0" Grid.Column="0" IsChecked="{Binding NodeModel.DebugSetting.IsEnable, Mode=TwoWay}"/>
<TextBlock Grid.Row="0" Grid.Column="1" Text="是否使能" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<CheckBox Grid.Row="1" Grid.Column="0" IsChecked="{Binding NodeModel.MethodDetails.IsProtectionParameter, Mode=TwoWay}"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text="参数保护" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<CheckBox Grid.Row="2" Grid.Column="0" IsChecked="{Binding NodeModel.DebugSetting.IsInterrupt, Mode=TwoWay}"/>
<TextBlock Grid.Row="2" Grid.Column="1" Text="中断节点" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</Grid>
<StackPanel Grid.Row="4" Background="Azure" Orientation="Horizontal" Margin="3">
<StackPanel Orientation="Horizontal" Margin="2,1,2,1">
<CheckBox IsChecked="{Binding NodeModel.DebugSetting.IsEnable, Mode=TwoWay}"/>
<TextBlock Text="是否使能" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="2,1,2,1">
<CheckBox IsChecked="{Binding NodeModel.MethodDetails.IsProtectionParameter, Mode=TwoWay}"/>
<TextBlock Text="参数保护" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="2,1,2,1">
<CheckBox IsChecked="{Binding NodeModel.DebugSetting.IsInterrupt, Mode=TwoWay}"/>
<TextBlock Text="中断节点" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</StackPanel>
</StackPanel>
<!--<themes:ConditionControl Grid.Row="2" ></themes:ConditionControl>-->
</Grid>
</Border>

View File

@@ -56,9 +56,9 @@
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<!--<PackageReference Include="MySqlConnector" Version="2.4.0" />
<PackageReference Include="MySqlConnector" Version="2.4.0" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.170" />
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.1.4.171" />-->
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.1.4.171" />
<!--<PackageReference Include="LivetCask2" Version="4.0.2" />-->
<!--<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />-->