| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- <UserControl x:Class="TeamAAS_VP.Views.Product.ProductProcessManage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
- xmlns:lex="http://wpflocalizeextension.codeplex.com"
- lex:LocalizeDictionary.DesignCulture="zh-CN"
- lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
- lex:ResxLocalizationProvider.DefaultDictionary="Lang"
- prism:ViewModelLocator.AutoWireViewModel="True"
- HorizontalContentAlignment="Stretch"
- HorizontalAlignment="Stretch"
- mc:Ignorable="d"
- d:DataContext="{d:DesignInstance Type=vm:ProductProcessManageViewModel}"
- d:Height="600"
- d:Width="1024"
- d:Background="White"
- FontFamily="{DynamicResource DefaultFont}"
- Cursor="Hand">
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="Loaded">
- <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="*" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <Button Grid.Row="0"
- Content="{materialDesign:PackIcon Kind=ArrowLeftCircle}"
- Width="50"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- ToolTip="{lex:Loc 返回}"
- Style="{StaticResource MaterialDesignIconButton}"
- Command="{Binding BackCommand}" />
- <StackPanel Grid.Row="0"
- Orientation="Horizontal"
- Margin="50,0"
- VerticalAlignment="Center">
- <materialDesign:PackIcon Kind="CubeOutline"
- Width="30"
- Height="30" />
- <TextBlock Text="{Binding SelectProduct.Name}"
- VerticalAlignment="Center" />
- <TextBlock Text="{lex:Loc 视觉流程管理,Converter={StaticResource StringFormatConverter},ConverterParameter=' - {0}'}"
- VerticalAlignment="Center" />
- </StackPanel>
- <Border BorderThickness="1,1,1,1"
- VerticalAlignment="Bottom"
- Height="1">
- <Border.BorderBrush>
- <VisualBrush>
- <VisualBrush.Visual>
- <Rectangle StrokeDashArray="4 4"
- Stroke="LightGray"
- StrokeThickness="1"
- Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
- Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
- </VisualBrush.Visual>
- </VisualBrush>
- </Border.BorderBrush>
- </Border>
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Expander Grid.Column="0"
- ExpandDirection="Right"
- Background="Transparent">
- <Expander.Header>
- <TextBlock RenderTransformOrigin=".5,.5"
- Text="Navigation Description">
- <TextBlock.LayoutTransform>
- <RotateTransform Angle="90" />
- </TextBlock.LayoutTransform>
- </TextBlock>
- </Expander.Header>
- <ScrollViewer>
- <StackPanel Margin="8,24,16,24"
- Orientation="Vertical">
- <Image Source="pack://application:,,,/TeamAAS-VP;component/Resources/Images/2视觉流程管理.png"
- Stretch="Uniform"
- Width="350"
- HorizontalAlignment="Center"
- VerticalAlignment="Top" />
- <TextBlock Text="{lex:Loc 视觉流程管理}" />
- <TextBlock Foreground="Gray"
- TextWrapping="Wrap"
- Text="{lex:Loc 视觉流程管理描述}" />
- </StackPanel>
- </ScrollViewer>
- </Expander>
- <materialDesign:Card Grid.Column="1"
- Width="500"
- Margin="50"
- IsEnabled="{Binding IsAllowEdit}">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <GroupBox Grid.Column="0"
- Width="300"
- Style="{StaticResource MaterialDesignCardGroupBox}">
- <GroupBox.Header>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="Subtasks"
- Foreground="White" />
- <TextBlock Text="{lex:Loc 视觉流程集合}"
- Foreground="White"
- Margin="5,0" />
- </StackPanel>
- </GroupBox.Header>
- <!--相机和流程列表-->
- <TreeView x:Name="tv_Procedure"
- Grid.Column="0"
- ItemsSource="{Binding SelectProduct.CameraProcedures}">
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="SelectedItemChanged">
- <b:CallMethodAction TargetObject="{Binding}"
- MethodName="TreeView_SelectedItemChanged" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- <!--默认展开所有节点-->
- <TreeView.ItemContainerStyle>
- <Style TargetType="TreeViewItem">
- <Setter Property="IsExpanded"
- Value="True" />
- </Style>
- </TreeView.ItemContainerStyle>
- <TreeView.ItemTemplate>
- <HierarchicalDataTemplate ItemsSource="{Binding ProcedureModels}">
- <HierarchicalDataTemplate.ItemTemplate>
- <HierarchicalDataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="ProgressWrench" />
- <TextBlock Text="{Binding Name}"
- Margin="5,0" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </HierarchicalDataTemplate.ItemTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="Camera" />
- <TextBlock Text="{Binding Camera}"
- Margin="5,0" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </TreeView.ItemTemplate>
- </TreeView>
- </GroupBox>
- <StackPanel Grid.Column="1"
- Orientation="Vertical"
- Margin="20"
- HorizontalAlignment="Center">
- <Button ToolTip="{lex:Loc 增加流程}"
- Command="{Binding AddProProcessCommand}"
- CommandParameter="{Binding ElementName=tv_Procedure,Path=SelectedItem}">
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="Add" />
- <TextBlock Text="{lex:Loc 增加流程}" />
- </StackPanel>
- </Button>
- <Button Margin="0,20"
- ToolTip="{lex:Loc 删除流程}"
- Command="{Binding RemoveProProcessCommand}"
- CommandParameter="{Binding ElementName=tv_Procedure,Path=SelectedItem}">
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="Minus" />
- <TextBlock Text="{lex:Loc 删除流程}" />
- </StackPanel>
- </Button>
- </StackPanel>
- </Grid>
- </materialDesign:Card>
- </Grid>
- <Button Grid.Row="2"
- Content="{lex:Loc 下一步}"
- IsEnabled="{Binding IsAllowEdit}"
- MinWidth="100"
- Margin="20"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- materialDesign:ButtonAssist.CornerRadius="10"
- Style="{StaticResource MaterialDesignRaisedButton}"
- Command="{Binding NextCommand}" />
- </Grid>
- </UserControl>
|