AdvancedProcedure.xaml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <UserControl x:Class="TeamAAS_VP.Views.Product.AdvancedProcedure"
  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:wf="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
  6. xmlns:vp="clr-namespace:Cognex.VisionPro.ToolBlock;assembly=Cognex.VisionPro.ToolGroup.Controls"
  7. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  8. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  10. xmlns:uControl="clr-namespace:TeamAAS_VP.Controls"
  11. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  12. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  13. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
  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:AdvancedProcedureViewModel}"
  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. <Grid>
  31. <Grid.RowDefinitions>
  32. <RowDefinition Height="auto" />
  33. <RowDefinition Height="*" />
  34. <RowDefinition Height="auto" />
  35. </Grid.RowDefinitions>
  36. <Button Grid.Row="0"
  37. Content="{materialDesign:PackIcon Kind=ArrowLeftCircle}"
  38. Width="50"
  39. HorizontalAlignment="Left"
  40. VerticalAlignment="Top"
  41. ToolTip="{lex:Loc 返回}"
  42. Style="{StaticResource MaterialDesignIconButton}"
  43. Command="{Binding BackCommand}" />
  44. <StackPanel Grid.Row="0"
  45. Orientation="Horizontal"
  46. Margin="50,0"
  47. VerticalAlignment="Center">
  48. <materialDesign:PackIcon Kind="CubeOutline"
  49. Width="30"
  50. Height="30" />
  51. <TextBlock Text="{Binding SelectProduct.Name,Mode=TwoWay}"
  52. VerticalAlignment="Center" />
  53. <TextBlock Text="{lex:Loc 图像处理高级模式,Converter={StaticResource StringFormatConverter},ConverterParameter=' - {0}'}"
  54. VerticalAlignment="Center" />
  55. </StackPanel>
  56. <Border BorderThickness="1,1,1,1"
  57. VerticalAlignment="Bottom"
  58. Height="1">
  59. <Border.BorderBrush>
  60. <VisualBrush>
  61. <VisualBrush.Visual>
  62. <Rectangle StrokeDashArray="4 4"
  63. Stroke="LightGray"
  64. StrokeThickness="1"
  65. Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
  66. Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
  67. </VisualBrush.Visual>
  68. </VisualBrush>
  69. </Border.BorderBrush>
  70. </Border>
  71. <materialDesign:DrawerHost Grid.Row="1"
  72. OpenMode="Standard"
  73. x:Name="DrawerHost">
  74. <materialDesign:DrawerHost.RightDrawerContent>
  75. <uControl:RobotManual x:Name="robotManual" />
  76. </materialDesign:DrawerHost.RightDrawerContent>
  77. <Grid>
  78. <Grid.ColumnDefinitions>
  79. <ColumnDefinition Width="auto" />
  80. <ColumnDefinition Width="*" />
  81. </Grid.ColumnDefinitions>
  82. <Expander Grid.Column="0"
  83. ExpandDirection="Right"
  84. Background="Transparent">
  85. <Expander.Header>
  86. <TextBlock RenderTransformOrigin=".5,.5"
  87. Text="Navigation Description">
  88. <TextBlock.LayoutTransform>
  89. <RotateTransform Angle="90" />
  90. </TextBlock.LayoutTransform>
  91. </TextBlock>
  92. </Expander.Header>
  93. <ScrollViewer>
  94. <StackPanel Margin="8,24,16,24"
  95. Orientation="Vertical">
  96. <Image Source="pack://application:,,,/TeamAAS-VP;component/Resources/Images/5视觉工具处理.png"
  97. Stretch="Uniform"
  98. Width="350"
  99. HorizontalAlignment="Center"
  100. VerticalAlignment="Top" />
  101. <TextBlock Text="{lex:Loc 图像处理}" />
  102. <TextBlock Foreground="Gray"
  103. TextWrapping="Wrap"
  104. Text="{lex:Loc 图像处理描述1}" />
  105. </StackPanel>
  106. </ScrollViewer>
  107. </Expander>
  108. <Grid Grid.Column="1"
  109. IsEnabled="{Binding IsAllowEdit}">
  110. <Grid.RowDefinitions>
  111. <RowDefinition Height="*" />
  112. <RowDefinition Height="auto" />
  113. </Grid.RowDefinitions>
  114. <wf:WindowsFormsHost Grid.Row="0"
  115. Margin="5,5,50,5"
  116. IsEnabled="{Binding IsAllowEdit}">
  117. <vp:CogToolBlockEditV2 x:Name="ToolBlockEditV2" />
  118. </wf:WindowsFormsHost>
  119. <StackPanel Grid.Row="1"
  120. Margin="5,3"
  121. HorizontalAlignment="Left"
  122. VerticalAlignment="Center"
  123. Orientation="Horizontal">
  124. <Button Content="{lex:Loc 运行流程}"
  125. Width="100"
  126. Command="{Binding RunVisionProcessCommand}" />
  127. <TextBlock Text="{Binding Message}"
  128. Margin="10,0"
  129. VerticalAlignment="Center"
  130. Foreground="Gray" />
  131. </StackPanel>
  132. <Button Grid.Row="1"
  133. Margin="5,3"
  134. HorizontalAlignment="Right"
  135. VerticalAlignment="Center"
  136. Content="{lex:Loc 视觉静态精度分析}"
  137. MinWidth="100"
  138. Command="{Binding VisionStaticAccuracyAnalyzerCommand}" />
  139. <ToggleButton materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=ArrowRight}"
  140. Content="{materialDesign:PackIcon Kind=RobotIndustrial}"
  141. Style="{StaticResource MaterialDesignActionToggleButton}"
  142. ToolTip="{lex:Loc 机器人步进}"
  143. Margin="5,0"
  144. HorizontalAlignment="Right"
  145. VerticalAlignment="Top"
  146. IsChecked="{Binding IsRightDrawerOpen,ElementName=DrawerHost}" />
  147. </Grid>
  148. </Grid>
  149. </materialDesign:DrawerHost>
  150. <StackPanel Grid.Row="2"
  151. Orientation="Horizontal"
  152. HorizontalAlignment="Center"
  153. VerticalAlignment="Center"
  154. Margin="20">
  155. <Button IsEnabled="{Binding IsAllowEdit}"
  156. Content="{lex:Loc 下一步}"
  157. MinWidth="100"
  158. HorizontalAlignment="Center"
  159. VerticalAlignment="Center"
  160. materialDesign:ButtonAssist.CornerRadius="10"
  161. Style="{StaticResource MaterialDesignRaisedButton}"
  162. Command="{Binding NextCommand}" />
  163. </StackPanel>
  164. </Grid>
  165. </UserControl>