VppFlowEditorView.xaml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <UserControl x:Class="Plugins.Vpp.Views.VppFlowEditorView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:loc="clr-namespace:TeamAAS.Localization;assembly=TeamAAS.Global"
  5. xmlns:hc="https://handyorg.github.io/handycontrol"
  6. xmlns:fe="clr-namespace:TeamAAS.FlowEditor;assembly=TeamAAS.FlowEngine"
  7. Background="{DynamicResource SecondaryRegionBrush}">
  8. <DockPanel>
  9. <!-- 顶部工具栏 -->
  10. <Border DockPanel.Dock="Top" Height="36"
  11. Background="{DynamicResource RegionBrush}"
  12. BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
  13. <Grid>
  14. <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="8,0">
  15. <TextBlock x:Name="TxtTitle" Text="{loc:Translate 'VPP流程'}" FontSize="14" FontWeight="Bold"
  16. Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" Margin="0,0,16,0"/>
  17. <TextBlock Text="{loc:Translate '(工具箱仅显示 VisionPro 算子,按视觉类别分组;点节点查看该节点图像)'}" FontSize="11"
  18. Foreground="{DynamicResource SecondaryTextBrush}" VerticalAlignment="Center"/>
  19. </StackPanel>
  20. <Button x:Name="BtnProperties" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,8,0"
  21. Width="Auto" Height="Auto" Cursor="Hand"
  22. Background="Transparent" BorderThickness="0"
  23. Tag="{loc:Translate '打开 VPP 流程属性设置(输入/输出参数映射、循环次数)'}"
  24. Click="BtnProperties_Click">
  25. <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"
  26. Width="22" Height="22" Stretch="Uniform"
  27. Fill="{DynamicResource PrimaryTextBrush}"/>
  28. </Button>
  29. </Grid>
  30. </Border>
  31. <!-- 主体:子流程编辑器。视觉显示面板在构造时注入其右侧面板(替换「节点信息」区) -->
  32. <Grid x:Name="EditorRoot">
  33. <fe:FlowEditorView x:Name="SubFlowEditor"/>
  34. <!-- 视觉显示面板:构造时经 SubFlowEditor.ReplaceNodeInfoPanel 注入右侧面板,不在此处布局 -->
  35. <Grid x:Name="VisionPanel" Visibility="Collapsed" MinHeight="320"
  36. Background="{DynamicResource RegionBrush}">
  37. <Grid.RowDefinitions>
  38. <RowDefinition Height="Auto"/> <!-- 标题 + 图层筛选 -->
  39. <RowDefinition Height="*"/> <!-- 大显示窗 -->
  40. <RowDefinition Height="Auto"/> <!-- 运行状态行 -->
  41. </Grid.RowDefinitions>
  42. <Grid Grid.Row="0" Margin="6,4,6,4">
  43. <TextBlock Text="{loc:Translate '视觉显示'}" FontSize="13" FontWeight="Bold"
  44. Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center"/>
  45. <TextBlock Text="跟随最新运行" FontSize="11" HorizontalAlignment="Right"
  46. Foreground="{DynamicResource SecondaryTextBrush}" VerticalAlignment="Center"/>
  47. </Grid>
  48. <!-- 大显示窗 -->
  49. <ContentControl x:Name="DisplayHost" Grid.Row="1" Focusable="False"/>
  50. <!-- 运行状态行:当前显示的节点/图层数/批次 -->
  51. <TextBlock x:Name="RunStatusText" Grid.Row="2" Margin="6,4,6,4" FontSize="11" TextTrimming="CharacterEllipsis"
  52. Foreground="{DynamicResource SecondaryTextBrush}"
  53. Text="{loc:Translate '等待运行…(节点运行后自动显示其图像)'}"/>
  54. </Grid>
  55. </Grid>
  56. </DockPanel>
  57. </UserControl>