CalibrationEditVision.xaml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <UserControl x:Class="TeamAAS_VP.Views.Calibration.CalibrationEditVision"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  8. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:wf="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
  10. xmlns:vp="clr-namespace:Cognex.VisionPro.ToolBlock;assembly=Cognex.VisionPro.ToolGroup.Controls"
  11. xmlns:uControl="clr-namespace:TeamAAS_VP.Controls"
  12. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Calibration"
  13. xmlns:convert="clr-namespace:TeamAAS_VP.ValueConverter"
  14. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  15. lex:LocalizeDictionary.DesignCulture="zh-CN"
  16. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  17. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  18. prism:ViewModelLocator.AutoWireViewModel="True"
  19. mc:Ignorable="d"
  20. d:DataContext="{d:DesignInstance Type=vm:CalibrationEditVisionViewModel}"
  21. d:Height="600"
  22. d:Width="1024"
  23. d:Background="White"
  24. FontFamily="{DynamicResource DefaultFont}">
  25. <b:Interaction.Triggers>
  26. <b:EventTrigger EventName="Loaded">
  27. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  28. </b:EventTrigger>
  29. </b:Interaction.Triggers>
  30. <UserControl.Resources>
  31. <convert:JogConverter x:Key="JogConverter" />
  32. </UserControl.Resources>
  33. <Grid>
  34. <Grid.RowDefinitions>
  35. <RowDefinition Height="auto" />
  36. <RowDefinition Height="*" />
  37. <RowDefinition Height="auto" />
  38. </Grid.RowDefinitions>
  39. <Button Grid.Row="0"
  40. Content="{materialDesign:PackIcon Kind=ArrowLeftCircle}"
  41. Width="50"
  42. HorizontalAlignment="Left"
  43. VerticalAlignment="Top"
  44. ToolTip="{lex:Loc 返回}"
  45. Style="{StaticResource MaterialDesignIconButton}"
  46. Command="{Binding BackCommand}" />
  47. <StackPanel Grid.Row="0"
  48. Orientation="Horizontal"
  49. Margin="50,0"
  50. VerticalAlignment="Center">
  51. <materialDesign:PackIcon Kind="CrosshairsGps"
  52. Width="30"
  53. Height="30" />
  54. <TextBlock Text="{Binding SelectCalibration.Name,Converter={StaticResource StringFormatConverter},ConverterParameter=' [{0}] '}"
  55. VerticalAlignment="Center" />
  56. <TextBlock Text="{lex:Loc 校准视觉处理,Converter={StaticResource StringFormatConverter},ConverterParameter='- {0}'}"
  57. VerticalAlignment="Center" />
  58. </StackPanel>
  59. <materialDesign:DrawerHost Grid.Row="1"
  60. IsEnabled="{Binding IsAllowEdit}"
  61. OpenMode="Standard"
  62. x:Name="DrawerHost">
  63. <materialDesign:DrawerHost.RightDrawerContent>
  64. <uControl:RobotManual x:Name="robotManual" />
  65. </materialDesign:DrawerHost.RightDrawerContent>
  66. <Grid>
  67. <wf:WindowsFormsHost Grid.Column="0"
  68. Margin="0,0,0,35">
  69. <vp:CogToolBlockEditV2 x:Name="ToolBlockEditV2" />
  70. </wf:WindowsFormsHost>
  71. <Button Content="{lex:Loc 运行流程}"
  72. Width="100"
  73. HorizontalAlignment="Left"
  74. VerticalAlignment="Bottom"
  75. Margin="5,3"
  76. Command="{Binding RunVisionProcessCommand}" />
  77. </Grid>
  78. </materialDesign:DrawerHost>
  79. <StackPanel Orientation="Horizontal"
  80. HorizontalAlignment="Right"
  81. VerticalAlignment="Bottom">
  82. <ToggleButton materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=ArrowRight}"
  83. Content="{materialDesign:PackIcon Kind=RobotIndustrial}"
  84. IsEnabled="{Binding IsAllowEdit}"
  85. Style="{StaticResource MaterialDesignActionToggleButton}"
  86. ToolTip="{lex:Loc 机器人步进}"
  87. Margin="2,0"
  88. IsChecked="{Binding IsRightDrawerOpen,ElementName=DrawerHost}" />
  89. </StackPanel>
  90. <StackPanel Grid.Row="2"
  91. Orientation="Horizontal"
  92. HorizontalAlignment="Center"
  93. VerticalAlignment="Center"
  94. Margin="20">
  95. <Button Content="{lex:Loc 下一步}"
  96. IsEnabled="{Binding IsAllowEdit}"
  97. MinWidth="150"
  98. Margin="10,0"
  99. HorizontalAlignment="Center"
  100. VerticalAlignment="Center"
  101. materialDesign:ButtonAssist.CornerRadius="10"
  102. Style="{StaticResource MaterialDesignRaisedButton}"
  103. Command="{Binding NextCommand}" />
  104. </StackPanel>
  105. </Grid>
  106. </UserControl>