ProductProcessManage.xaml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <UserControl x:Class="TeamAAS_VP.Views.Product.ProductProcessManage"
  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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  6. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
  10. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  11. lex:LocalizeDictionary.DesignCulture="zh-CN"
  12. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  13. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  14. prism:ViewModelLocator.AutoWireViewModel="True"
  15. HorizontalContentAlignment="Stretch"
  16. HorizontalAlignment="Stretch"
  17. mc:Ignorable="d"
  18. d:DataContext="{d:DesignInstance Type=vm:ProductProcessManageViewModel}"
  19. d:Height="600"
  20. d:Width="1024"
  21. d:Background="White"
  22. FontFamily="{DynamicResource DefaultFont}"
  23. Cursor="Hand">
  24. <b:Interaction.Triggers>
  25. <b:EventTrigger EventName="Loaded">
  26. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  27. </b:EventTrigger>
  28. </b:Interaction.Triggers>
  29. <Grid>
  30. <Grid.RowDefinitions>
  31. <RowDefinition Height="auto" />
  32. <RowDefinition Height="*" />
  33. <RowDefinition Height="auto" />
  34. </Grid.RowDefinitions>
  35. <Button Grid.Row="0"
  36. Content="{materialDesign:PackIcon Kind=ArrowLeftCircle}"
  37. Width="50"
  38. HorizontalAlignment="Left"
  39. VerticalAlignment="Top"
  40. ToolTip="{lex:Loc 返回}"
  41. Style="{StaticResource MaterialDesignIconButton}"
  42. Command="{Binding BackCommand}" />
  43. <StackPanel Grid.Row="0"
  44. Orientation="Horizontal"
  45. Margin="50,0"
  46. VerticalAlignment="Center">
  47. <materialDesign:PackIcon Kind="CubeOutline"
  48. Width="30"
  49. Height="30" />
  50. <TextBlock Text="{Binding SelectProduct.Name}"
  51. VerticalAlignment="Center" />
  52. <TextBlock Text="{lex:Loc 视觉流程管理,Converter={StaticResource StringFormatConverter},ConverterParameter=' - {0}'}"
  53. VerticalAlignment="Center" />
  54. </StackPanel>
  55. <Border BorderThickness="1,1,1,1"
  56. VerticalAlignment="Bottom"
  57. Height="1">
  58. <Border.BorderBrush>
  59. <VisualBrush>
  60. <VisualBrush.Visual>
  61. <Rectangle StrokeDashArray="4 4"
  62. Stroke="LightGray"
  63. StrokeThickness="1"
  64. Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
  65. Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
  66. </VisualBrush.Visual>
  67. </VisualBrush>
  68. </Border.BorderBrush>
  69. </Border>
  70. <Grid Grid.Row="1">
  71. <Grid.ColumnDefinitions>
  72. <ColumnDefinition Width="auto" />
  73. <ColumnDefinition Width="*" />
  74. </Grid.ColumnDefinitions>
  75. <Expander Grid.Column="0"
  76. ExpandDirection="Right"
  77. Background="Transparent">
  78. <Expander.Header>
  79. <TextBlock RenderTransformOrigin=".5,.5"
  80. Text="Navigation Description">
  81. <TextBlock.LayoutTransform>
  82. <RotateTransform Angle="90" />
  83. </TextBlock.LayoutTransform>
  84. </TextBlock>
  85. </Expander.Header>
  86. <ScrollViewer>
  87. <StackPanel Margin="8,24,16,24"
  88. Orientation="Vertical">
  89. <Image Source="pack://application:,,,/TeamAAS-VP;component/Resources/Images/2视觉流程管理.png"
  90. Stretch="Uniform"
  91. Width="350"
  92. HorizontalAlignment="Center"
  93. VerticalAlignment="Top" />
  94. <TextBlock Text="{lex:Loc 视觉流程管理}" />
  95. <TextBlock Foreground="Gray"
  96. TextWrapping="Wrap"
  97. Text="{lex:Loc 视觉流程管理描述}" />
  98. </StackPanel>
  99. </ScrollViewer>
  100. </Expander>
  101. <materialDesign:Card Grid.Column="1"
  102. Width="500"
  103. Margin="50"
  104. IsEnabled="{Binding IsAllowEdit}">
  105. <Grid>
  106. <Grid.ColumnDefinitions>
  107. <ColumnDefinition Width="auto" />
  108. <ColumnDefinition Width="auto" />
  109. </Grid.ColumnDefinitions>
  110. <GroupBox Grid.Column="0"
  111. Width="300"
  112. Style="{StaticResource MaterialDesignCardGroupBox}">
  113. <GroupBox.Header>
  114. <StackPanel Orientation="Horizontal">
  115. <materialDesign:PackIcon Kind="Subtasks"
  116. Foreground="White" />
  117. <TextBlock Text="{lex:Loc 视觉流程集合}"
  118. Foreground="White"
  119. Margin="5,0" />
  120. </StackPanel>
  121. </GroupBox.Header>
  122. <!--相机和流程列表-->
  123. <TreeView x:Name="tv_Procedure"
  124. Grid.Column="0"
  125. ItemsSource="{Binding SelectProduct.CameraProcedures}">
  126. <b:Interaction.Triggers>
  127. <b:EventTrigger EventName="SelectedItemChanged">
  128. <b:CallMethodAction TargetObject="{Binding}"
  129. MethodName="TreeView_SelectedItemChanged" />
  130. </b:EventTrigger>
  131. </b:Interaction.Triggers>
  132. <!--默认展开所有节点-->
  133. <TreeView.ItemContainerStyle>
  134. <Style TargetType="TreeViewItem">
  135. <Setter Property="IsExpanded"
  136. Value="True" />
  137. </Style>
  138. </TreeView.ItemContainerStyle>
  139. <TreeView.ItemTemplate>
  140. <HierarchicalDataTemplate ItemsSource="{Binding ProcedureModels}">
  141. <HierarchicalDataTemplate.ItemTemplate>
  142. <HierarchicalDataTemplate>
  143. <StackPanel Orientation="Horizontal">
  144. <materialDesign:PackIcon Kind="ProgressWrench" />
  145. <TextBlock Text="{Binding Name}"
  146. Margin="5,0" />
  147. </StackPanel>
  148. </HierarchicalDataTemplate>
  149. </HierarchicalDataTemplate.ItemTemplate>
  150. <StackPanel Orientation="Horizontal">
  151. <materialDesign:PackIcon Kind="Camera" />
  152. <TextBlock Text="{Binding Camera}"
  153. Margin="5,0" />
  154. </StackPanel>
  155. </HierarchicalDataTemplate>
  156. </TreeView.ItemTemplate>
  157. </TreeView>
  158. </GroupBox>
  159. <StackPanel Grid.Column="1"
  160. Orientation="Vertical"
  161. Margin="20"
  162. HorizontalAlignment="Center">
  163. <Button ToolTip="{lex:Loc 增加流程}"
  164. Command="{Binding AddProProcessCommand}"
  165. CommandParameter="{Binding ElementName=tv_Procedure,Path=SelectedItem}">
  166. <StackPanel Orientation="Horizontal">
  167. <materialDesign:PackIcon Kind="Add" />
  168. <TextBlock Text="{lex:Loc 增加流程}" />
  169. </StackPanel>
  170. </Button>
  171. <Button Margin="0,20"
  172. ToolTip="{lex:Loc 删除流程}"
  173. Command="{Binding RemoveProProcessCommand}"
  174. CommandParameter="{Binding ElementName=tv_Procedure,Path=SelectedItem}">
  175. <StackPanel Orientation="Horizontal">
  176. <materialDesign:PackIcon Kind="Minus" />
  177. <TextBlock Text="{lex:Loc 删除流程}" />
  178. </StackPanel>
  179. </Button>
  180. </StackPanel>
  181. </Grid>
  182. </materialDesign:Card>
  183. </Grid>
  184. <Button Grid.Row="2"
  185. Content="{lex:Loc 下一步}"
  186. IsEnabled="{Binding IsAllowEdit}"
  187. MinWidth="100"
  188. Margin="20"
  189. HorizontalAlignment="Center"
  190. VerticalAlignment="Center"
  191. materialDesign:ButtonAssist.CornerRadius="10"
  192. Style="{StaticResource MaterialDesignRaisedButton}"
  193. Command="{Binding NextCommand}" />
  194. </Grid>
  195. </UserControl>