| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443 |
- <UserControl x:Class="TeamAAS_VP.Views.Product.ProductParams"
- 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:sys="clr-namespace:System;assembly=mscorlib"
- xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
- xmlns:uControl="clr-namespace:TeamAAS_VP.Controls"
- 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"
- mc:Ignorable="d"
- d:DataContext="{d:DesignInstance Type=vm:ProductParamsViewModel}"
- d:Height="600"
- d:Width="1024"
- d:Background="White"
- FontFamily="{DynamicResource DefaultFont}">
- <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>
- <materialDesign:DrawerHost Grid.Row="1"
- OpenMode="Standard"
- x:Name="DrawerHost"
- IsEnabled="{Binding IsAllowEdit}">
- <materialDesign:DrawerHost.RightDrawerContent>
- <uControl:ParameterEdit x:Name="parameterEdit"/>
- </materialDesign:DrawerHost.RightDrawerContent>
- <Grid>
- <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/10产品参数.png"
- Stretch="Uniform"
- Width="350"
- HorizontalAlignment="Center"
- VerticalAlignment="Top" />
- <TextBlock Text="{lex:Loc 产品参数设定}" />
- <TextBlock Foreground="Gray"
- TextWrapping="Wrap"
- Text="{lex:Loc 产品参数设定描述}" />
- </StackPanel>
- </ScrollViewer>
- </Expander>
- <Grid Grid.Column="1"
- IsEnabled="{Binding IsAllowEdit}"
- Margin="10"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Grid.Resources>
- <Style TargetType="TextBlock">
- <Setter Property="HorizontalAlignment"
- Value="Right" />
- <Setter Property="VerticalAlignment"
- Value="Center" />
- <Setter Property="FontSize"
- Value="10" />
- <Setter Property="FontWeight"
- Value="Bold" />
- <Setter Property="Margin"
- Value="5,2" />
- </Style>
- <Style TargetType="TextBox"
- BasedOn="{StaticResource MaterialDesignFloatingHintTextBox}">
- <Setter Property="HorizontalAlignment"
- Value="Center" />
- <Setter Property="VerticalAlignment"
- Value="Center" />
- <Setter Property="FontSize"
- Value="10" />
- <Setter Property="Margin"
- Value="5,2" />
- <Setter Property="MinWidth"
- Value="100" />
- <Setter Property="HorizontalContentAlignment"
- Value="Center" />
- <Setter Property="VerticalContentAlignment"
- Value="Center" />
- </Style>
- </Grid.Resources>
- <ToggleButton Grid.Column="1"
- Grid.Row="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=ChevronDoubleLeft}"
- Content="{materialDesign:PackIcon Kind=ChevronDoubleRight}"
- Style="{StaticResource MaterialDesignActionToggleButton}"
- ToolTip="{lex:Loc 其他参数}"
- Margin="0,-40"
- IsChecked="{Binding IsRightDrawerOpen,ElementName=DrawerHost}" />
- <!--PTP速度-->
- <TextBlock Grid.Row="0"
- Grid.Column="0"
- Text="{lex:Loc PTP速度,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="0"
- Grid.Column="1"
- Margin="0,5"
- Maximum="100"
- Minimum="1"
- StringFormat="{}{0:N0} %"
- Value="{Binding SelectProduct.Speed,Mode=TwoWay}" />
- <!--PTP加减速度--><!--
- <TextBlock Grid.Row="1"
- Grid.Column="0"
- Text="{lex:Loc PTP加减速度,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="1"
- Grid.Column="1"
- Margin="0,5"
- Maximum="100"
- Minimum="1"
- StringFormat="{}{0:N0} %"
- Value="{Binding SelectProduct.Accel,Mode=TwoWay}" />
- --><!--CP速度--><!--
- <TextBlock Grid.Row="2"
- Grid.Column="0"
- Text="{lex:Loc CP速度,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="2"
- Grid.Column="1"
- Margin="0,5"
- Maximum="3000"
- Minimum="1"
- StringFormat="{}{0:N0} mm/s"
- Value="{Binding SelectProduct.Speeds,Mode=TwoWay}" />
- --><!--CP加减速度--><!--
- <TextBlock Grid.Row="3"
- Grid.Column="0"
- Text="{lex:Loc CP加减速度,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="3"
- Grid.Column="1"
- Margin="0,5"
- Maximum="30000"
- Minimum="1"
- StringFormat="{}{0:N0} mm/s²"
- Value="{Binding SelectProduct.Accels,Mode=TwoWay}" />
- --><!--功率--><!--
- <TextBlock Grid.Row="4"
- Grid.Column="0"
- Text="{lex:Loc 功率,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <CheckBox Grid.Row="4"
- Grid.Column="1"
- Content="{lex:Loc 高功率}"
- IsChecked="{Binding SelectProduct.Power}" />
- --><!--二次相机功能--><!--
- <TextBlock Grid.Row="5"
- Grid.Column="0"
- Text="{lex:Loc 视觉引导模式,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <CheckBox Grid.Row="5"
- Grid.Column="1"
- Content="{lex:Loc 启用二次定位相机}"
- IsChecked="{Binding SelectProduct.IsUserUpCamera}" />-->
- <!--固定向上相机1视觉流程-->
- <TextBlock Grid.Row="1"
- Grid.Column="0"
- Text="固定向上相机1视觉流程ID: " />
- <ComboBox Grid.Row="1"
- Grid.Column="1"
- ItemsSource="{Binding ProcedureModels}"
- SelectedItem="{Binding FixedUpCamera1Procedure}"
- materialDesign:TextFieldAssist.HasClearButton="True"
- materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="VideoOutline" />
- <TextBlock Text="{Binding CameraName}"
- Margin="6,0" />
- <materialDesign:PackIcon Kind="ProgressWrench" />
- <TextBlock Text="{Binding Name}"
- Margin="6,0" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <!--固定向上相机2视觉流程-->
- <TextBlock Grid.Row="2"
- Grid.Column="0"
- Text="固定向上相机2视觉流程ID: " />
- <ComboBox Grid.Row="2"
- Grid.Column="1"
- ItemsSource="{Binding ProcedureModels}"
- SelectedItem="{Binding FixedUpCamera2Procedure}"
- materialDesign:TextFieldAssist.HasClearButton="True"
- materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="VideoOutline" />
- <TextBlock Text="{Binding CameraName}"
- Margin="6,0" />
- <materialDesign:PackIcon Kind="ProgressWrench" />
- <TextBlock Text="{Binding Name}"
- Margin="6,0" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <!--固定向下相机1取料流程-->
- <TextBlock Grid.Row="3"
- Grid.Column="0"
- Text="固定向下相机1取料流程ID: " />
- <ComboBox Grid.Row="3"
- Grid.Column="1"
- ItemsSource="{Binding ProcedureModels}"
- SelectedItem="{Binding FixedDownCamera1Procedure}"
- materialDesign:TextFieldAssist.HasClearButton="True"
- materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="VideoOutline" />
- <TextBlock Text="{Binding CameraName}"
- Margin="6,0" />
- <materialDesign:PackIcon Kind="ProgressWrench" />
- <TextBlock Text="{Binding Name}"
- Margin="6,0" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <!--固定向下相机2取料流程-->
- <TextBlock Grid.Row="4"
- Grid.Column="0"
- Text="固定向下相机2取料流程ID: " />
- <ComboBox Grid.Row="4"
- Grid.Column="1"
- ItemsSource="{Binding ProcedureModels}"
- SelectedItem="{Binding FixedDownCamera2Procedure}"
- materialDesign:TextFieldAssist.HasClearButton="True"
- materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="VideoOutline" />
- <TextBlock Text="{Binding CameraName}"
- Margin="6,0" />
- <materialDesign:PackIcon Kind="ProgressWrench" />
- <TextBlock Text="{Binding Name}"
- Margin="6,0" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <!--移动向下相机1锁付拍照流程-->
- <TextBlock Grid.Row="5"
- Grid.Column="0"
- Text="移动向下相机1锁付拍照流程ID: " />
- <ComboBox Grid.Row="5"
- Grid.Column="1"
- ItemsSource="{Binding ProcedureModels}"
- SelectedItem="{Binding MoveDownCamera1LockPhotoProcedure}"
- materialDesign:TextFieldAssist.HasClearButton="True"
- materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="VideoOutline" />
- <TextBlock Text="{Binding CameraName}"
- Margin="6,0" />
- <materialDesign:PackIcon Kind="ProgressWrench" />
- <TextBlock Text="{Binding Name}"
- Margin="6,0" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <!--移动向下相机2锁付拍照流程-->
- <TextBlock Grid.Row="6"
- Grid.Column="0"
- Text="移动向下相机2锁付拍照流程ID: " />
- <ComboBox Grid.Row="6"
- Grid.Column="1"
- ItemsSource="{Binding ProcedureModels}"
- SelectedItem="{Binding MoveDownCamera2LockPhotoProcedure}"
- materialDesign:TextFieldAssist.HasClearButton="True"
- materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="VideoOutline" />
- <TextBlock Text="{Binding CameraName}"
- Margin="6,0" />
- <materialDesign:PackIcon Kind="ProgressWrench" />
- <TextBlock Text="{Binding Name}"
- Margin="6,0" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <!--移动向下相机1取料拍照流程-->
- <TextBlock Grid.Row="7"
- Grid.Column="0"
- Text="移动向下相机1取料拍照流程ID: " />
- <ComboBox Grid.Row="7"
- Grid.Column="1"
- ItemsSource="{Binding ProcedureModels}"
- SelectedItem="{Binding MoveDownCamer1PickPhotoProcedureId}"
- materialDesign:TextFieldAssist.HasClearButton="True"
- materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="VideoOutline" />
- <TextBlock Text="{Binding CameraName}"
- Margin="6,0" />
- <materialDesign:PackIcon Kind="ProgressWrench" />
- <TextBlock Text="{Binding Name}"
- Margin="6,0" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <!--移动向下相机2取料拍照流程-->
- <TextBlock Grid.Row="8"
- Grid.Column="0"
- Text="移动向下相机2取料拍照流程ID: " />
- <ComboBox Grid.Row="8"
- Grid.Column="1"
- ItemsSource="{Binding ProcedureModels}"
- SelectedItem="{Binding MoveDownCamer2PickPhotoProcedureId}"
- materialDesign:TextFieldAssist.HasClearButton="True"
- materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="VideoOutline" />
- <TextBlock Text="{Binding CameraName}"
- Margin="6,0" />
- <materialDesign:PackIcon Kind="ProgressWrench" />
- <TextBlock Text="{Binding Name}"
- Margin="6,0" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- </Grid>
- </Grid>
-
- </materialDesign:DrawerHost>
- <StackPanel Grid.Row="2"
- Orientation="Horizontal"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Margin="20">
- <Button Content="{lex:Loc 完成}"
- IsEnabled="{Binding IsAllowEdit}"
- MinWidth="100"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- materialDesign:ButtonAssist.CornerRadius="10"
- Style="{StaticResource MaterialDesignRaisedButton}"
- Command="{Binding NextCommand}" />
- </StackPanel>
- </Grid>
- </UserControl>
|