| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <UserControl x:Class="Plugins.Halcon.Views.HalconFlowEditorView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:loc="clr-namespace:TeamAAS.Localization;assembly=TeamAAS.Global"
- xmlns:hc="https://handyorg.github.io/handycontrol"
- xmlns:fe="clr-namespace:TeamAAS.FlowEditor;assembly=TeamAAS.FlowEngine"
- xmlns:v="clr-namespace:Plugins.Halcon.Views"
- Background="{DynamicResource SecondaryRegionBrush}">
- <DockPanel>
- <!-- 顶部工具栏 -->
- <Border DockPanel.Dock="Top" Height="36"
- Background="{DynamicResource RegionBrush}"
- BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
- <Grid>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="8,0">
- <TextBlock x:Name="TxtTitle" Text="{loc:Translate 'Halcon流程'}" FontSize="14" FontWeight="Bold"
- Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" Margin="0,0,16,0"/>
- <TextBlock Text="{loc:Translate '(工具箱仅显示 HALCON 节点,按视觉类别分组;点节点查看该节点图层)'}" FontSize="11"
- Foreground="{DynamicResource SecondaryTextBrush}" VerticalAlignment="Center"/>
- </StackPanel>
- <Button x:Name="BtnProperties" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,8,0"
- Width="Auto" Height="Auto" Cursor="Hand"
- Background="Transparent" BorderThickness="0"
- Tag="{loc:Translate '打开 HALCON 流程属性设置(输入/输出参数映射、循环次数)'}"
- Click="BtnProperties_Click">
- <Path Data="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.97,5.03C9.38,5.27,8.85,5.59,8.35,5.97L5.96,5.01C5.73,4.92,5.49,5.01,5.37,5.23L3.45,8.55 c-0.12,0.21-0.08,0.47,0.12,0.61l2.03,1.58C5.55,11.04,5.53,11.36,5.53,11.69c0,0.32,0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.37,2.22 c0.04,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.43-0.17,0.47-0.41l0.37-2.22c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.75c-2.07,0-3.75-1.68-3.75-3.75 c0-2.07,1.68-3.75,3.75-3.75c2.07,0,3.75,1.68,3.75,3.75C15.75,14.07,14.07,15.75,12,15.75z"
- Width="22" Height="22" Stretch="Uniform"
- Fill="{DynamicResource PrimaryTextBrush}"/>
- </Button>
- </Grid>
- </Border>
- <!-- 主体:子流程编辑器。视觉显示面板在构造时注入其右侧面板(替换「节点信息」区) -->
- <Grid x:Name="EditorRoot">
- <fe:FlowEditorView x:Name="SubFlowEditor"/>
- <!-- 视觉显示面板:构造时经 SubFlowEditor.ReplaceNodeInfoPanel 注入右侧面板,不在此处布局 -->
- <Grid x:Name="VisionPanel" Visibility="Collapsed" MinHeight="320"
- Background="{DynamicResource RegionBrush}">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/> <!-- 标题 + 图层筛选 -->
- <RowDefinition Height="*"/> <!-- 大显示窗 -->
- <RowDefinition Height="Auto"/> <!-- 运行状态行 -->
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="6,4,6,4">
- <TextBlock Text="{loc:Translate '视觉显示'}" FontSize="13" FontWeight="Bold"
- Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center"/>
- <ComboBox x:Name="LayerCombo" Width="170" HorizontalAlignment="Right"
- FontSize="12" ToolTip="{loc:Translate '筛选要显示的节点图层'}"
- SelectionChanged="LayerCombo_SelectionChanged"/>
- </Grid>
- <!-- 大显示窗(右键菜单含 缩放/适应/保存/绘制ROI) -->
- <ContentControl x:Name="DisplayHost" Grid.Row="1" Focusable="False"/>
- <!-- 运行状态行:当前显示的节点/图层数/批次 -->
- <TextBlock x:Name="RunStatusText" Grid.Row="2" Margin="6,4,6,4" FontSize="11" TextTrimming="CharacterEllipsis"
- Foreground="{DynamicResource SecondaryTextBrush}"
- Text="{loc:Translate '等待运行…(节点运行后自动显示其图层)'}"/>
- </Grid>
- </Grid>
- </DockPanel>
- </UserControl>
|