| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587 |
- <UserControl x:Class="TeamAAS_VP.Views.Product.ProcedureParams"
- 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:uControl="clr-namespace:TeamAAS_VP.Controls"
- xmlns:mah="http://metro.mahapps.com/winfx/xaml/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:enums="clr-namespace:TeamAAS_VP.Enums"
- xmlns:valueConverter="clr-namespace:TeamAAS_VP.ValueConverter"
- xmlns:ext="clr-namespace:TeamAAS_VP.Extension"
- 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:ProcedureParamsViewModel}"
- d:Height="1080"
- 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>
- <UserControl.Resources>
- <valueConverter:ImageFileNameFormatConverter x:Key="ImageFileNameFormatConverter" />
- </UserControl.Resources>
- <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/8流程参数设置.png"
- Stretch="Uniform"
- Width="350"
- HorizontalAlignment="Center"
- VerticalAlignment="Top" />
- <TextBlock Text="{lex:Loc 流程参数设定}" />
- <TextBlock Foreground="Gray"
- TextWrapping="Wrap"
- Text="{lex:Loc 流程参数设定描述}" />
- </StackPanel>
- </ScrollViewer>
- </Expander>
- <ScrollViewer Grid.Column="1"
- IsEnabled="{Binding IsAllowEdit}">
- <Grid x:Name="grid"
- Grid.Column="1"
- Margin="10"
- IsEnabled="{Binding IsAllowEdit}"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <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" />
- <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" />
- <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="12" />
- <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="14" />
- <Setter Property="Margin"
- Value="5,2" />
- <Setter Property="MinWidth"
- Value="100" />
- <Setter Property="HorizontalContentAlignment"
- Value="Center" />
- <Setter Property="VerticalContentAlignment"
- Value="Center" />
- </Style>
- <Style TargetType="mah:NumericUpDown">
- <Setter Property="Margin"
- Value="0,2,0,0" />
- </Style>
- </Grid.Resources>
- <GroupBox Grid.Row="0"
- Grid.ColumnSpan="2"
- Header="{lex:Loc 工具末端设定}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal">
- <Button Content="{lex:Loc 添加}"
- Command="{Binding AddToolCommand}" />
- </StackPanel>
- <ScrollViewer Grid.Row="1"
- Grid.IsSharedSizeScope="True">
- <ItemsControl x:Name="toollistview"
- ItemsSource="{Binding SelectProcedure.ToolInfo}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Border x:Name="Border"
- Padding="8"
- BorderBrush="{DynamicResource MaterialDesignDivider}"
- BorderThickness="0,0,0,1">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition SharedSizeGroup="Checkerz" />
- <ColumnDefinition SharedSizeGroup="Checkerz" />
- </Grid.ColumnDefinitions>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <!--offset-->
- <TextBox Grid.Row="0"
- Grid.Column="0"
- materialDesign:HintAssist.Hint="Offset X"
- Text="{Binding OffsetX,StringFormat={}{0:F3},Mode=TwoWay}" />
- <TextBox Grid.Row="0"
- Grid.Column="1"
- materialDesign:HintAssist.Hint="Offset Y"
- Text="{Binding OffsetY,StringFormat={}{0:F3},Mode=TwoWay}" />
- <TextBox Grid.Row="0"
- Grid.Column="2"
- materialDesign:HintAssist.Hint="{lex:Loc 取料高度}"
- Text="{Binding OffsetZ,StringFormat={}{0:F3},Mode=TwoWay}" />
- <TextBox Grid.Row="0"
- Grid.Column="3"
- materialDesign:HintAssist.Hint="Offset U"
- Text="{Binding OffsetU,StringFormat={}{0:F3},Mode=TwoWay}" />
- <!--Tool-->
- <TextBox Grid.Row="1"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- materialDesign:HintAssist.Hint="{lex:Loc 描述}"
- Text="{Binding Description,Mode=TwoWay}" />
- <TextBox Grid.Row="1"
- Grid.Column="2"
- materialDesign:HintAssist.Hint="Tool.X"
- Text="{Binding Tool.X,StringFormat={}{0:F3},Mode=TwoWay}" />
- <TextBox Grid.Row="1"
- Grid.Column="3"
- materialDesign:HintAssist.Hint="Tool.Y"
- Text="{Binding Tool.Y,StringFormat={}{0:F3},Mode=TwoWay}" />
- </Grid>
- <Button Grid.Column="1"
- Content="{lex:Loc 自动计算}"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Command="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type UserControl}},Path=DataContext.CalculateOffsetUAndToolCommand}"
- CommandParameter="{Binding Id}" />
- <Button Grid.Column="2"
- Style="{StaticResource MaterialDesignIconForegroundButton}"
- Command="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type UserControl}},Path=DataContext.RemoveToolCommand}"
- CommandParameter="{Binding Id}">
- <materialDesign:PackIcon Kind="CloseOctagon"
- Foreground="DarkRed" />
- </Button>
- </Grid>
- </Border>
- <DataTemplate.Triggers>
- <DataTrigger Binding="{Binding IsSelected}"
- Value="True">
- <Setter TargetName="Border"
- Property="Background"
- Value="{DynamicResource MaterialDesignSelection}" />
- </DataTrigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- </GroupBox>
- <!--Feeder振动完延时拍照-->
- <TextBlock Grid.Row="1"
- Grid.Column="0"
- Text="{lex:Loc Feeder振动完延时拍照,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="1"
- Grid.Column="1"
- Maximum="60000"
- Minimum="0"
- Interval="100"
- StringFormat="{}{0:N0} ms"
- Value="{Binding SelectProcedure.WaitFeederStop,Mode=TwoWay}" />
- <!--Feeder光源打开延时拍照-->
- <TextBlock Grid.Row="2"
- Grid.Column="0"
- Text="{lex:Loc Feeder光源打开延时拍照,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="2"
- Grid.Column="1"
- Maximum="60000"
- Minimum="0"
- Interval="100"
- StringFormat="{}{0:N0} ms"
- Value="{Binding SelectProcedure.WaitPhoto,Mode=TwoWay}" />
- <!--检测重复点位并剔除重复点位-->
- <TextBlock Grid.Row="3"
- Grid.Column="0"
- Text="{lex:Loc 检测重复点位并剔除重复点位,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <CheckBox Grid.Row="3"
- Grid.Column="1"
- Margin="0,2,0,0"
- IsChecked="{Binding SelectProcedure.IsExcludeNearPoint,Mode=TwoWay}" />
- <!--点位输出的模式-->
- <TextBlock Grid.Row="4"
- Grid.Column="0"
- Text="{lex:Loc 点位输出的模式,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <ComboBox Grid.Row="4"
- Grid.Column="1"
- SelectedItem="{Binding SelectProcedure.OutputPointMode,Mode=TwoWay}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:OutputPointMode}"
- BorderBrush="LightGray"
- BorderThickness="1"
- Margin="0,2,0,0" />
- <!--视觉引导模式(先拍再振/先振再拍)-->
- <TextBlock Grid.Row="5"
- Grid.Column="0"
- Text="{lex:Loc 视觉引导模式,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <ComboBox Grid.Row="5"
- Grid.Column="1"
- SelectedItem="{Binding SelectProcedure.VibrationModel,Mode=TwoWay}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:VibrationModel}"
- BorderBrush="LightGray"
- BorderThickness="1"
- Margin="0,2,0,0" />
- <!--拍照失败Feeder振动最大次数-->
- <TextBlock Grid.Row="6"
- Grid.Column="0"
- Text="{lex:Loc Feeder最大振动拍照次数,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="6"
- Grid.Column="1"
- Maximum="100"
- Minimum="1"
- StringFormat="{}{0:N0}"
- Value="{Binding SelectProcedure.FeederFailLimit,Mode=TwoWay}" />
- <!--每次发送给机器人的点数最大值-->
- <TextBlock Grid.Row="7"
- Grid.Column="0"
- Text="{lex:Loc 发送给机器人的最大点位数量,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="7"
- Grid.Column="1"
- Maximum="100"
- Minimum="1"
- StringFormat="{}{0:N0}"
- Value="{Binding SelectProcedure.OutputPointCountMax,Mode=TwoWay}" />
- <!--视觉流程输出项之间的分割符-->
- <TextBlock Grid.Row="8"
- Grid.Column="0"
- Text="{lex:Loc 视觉流程输出项之间的分割符,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <TextBox Grid.Row="8"
- Grid.Column="1"
- Text="{Binding SelectProcedure.OutputSeparator,Mode=TwoWay}"
- BorderThickness="1"
- Padding="0"
- HorizontalAlignment="Stretch"
- Margin="0,2,0,0" />
- <!--保存图像-->
- <TextBlock Grid.Row="9"
- Grid.Column="0"
- Text="{lex:Loc 保存图像,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <CheckBox x:Name="chbSaveImage"
- Grid.Row="9"
- Grid.Column="1"
- d:IsChecked="True"
- Content="{lex:Loc 是否保存,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
- IsChecked="{Binding SelectProcedure.IsSaveImage,Mode=TwoWay}"
- Style="{StaticResource MaterialDesignLightCheckBox}" />
- <!--保存图像模式-->
- <TextBlock Grid.Row="10"
- Grid.Column="0"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
- Text="{lex:Loc 图像存储模式,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <ComboBox Grid.Row="10"
- Grid.Column="1"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
- materialDesign:HintAssist.Hint="{lex:Loc 图像存储模式}"
- SelectedItem="{Binding SelectProcedure.SaveImageModel,Mode=TwoWay}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:ProcedureSaveImageModel}" />
- <!--保存图像路径存放模式-->
- <TextBlock Grid.Row="11"
- Grid.Column="0"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
- Text="{lex:Loc 图像路径存储方式,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <ComboBox Grid.Row="11"
- Grid.Column="1"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
- materialDesign:HintAssist.Hint="{lex:Loc 图像路径存储方式}"
- SelectedItem="{Binding SelectProcedure.SaveImagePathModel,Mode=TwoWay}"
- ItemsSource="{ext:EnumBindingSource EnumType=enums:ProcedureSaveImagePathModel}" />
- <!--保存路径-->
- <TextBlock Grid.Row="12"
- Grid.Column="0"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
- Text="{lex:Loc 保存路径,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <Grid Grid.Row="12"
- Grid.Column="1"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <TextBox BorderThickness="1"
- BorderBrush="LightGray"
- HorizontalAlignment="Stretch"
- materialDesign:HintAssist.Hint="{lex:Loc 保存路径}"
- materialDesign:HintAssist.FloatingHintHorizontalAlignment="Left"
- Text="{Binding SelectProcedure.SavePath,Mode=TwoWay}" />
- <Button Grid.Column="1"
- ToolTip="{lex:Loc 选择路径}"
- Command="{Binding SelectSaveImagePathCommand}">
- <Button.Content>
- <materialDesign:PackIcon Kind="FolderOpenOutline" />
- </Button.Content>
- </Button>
- </Grid>
- <!--是否压缩图像-->
- <TextBlock Grid.Row="13"
- Grid.Column="0"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
- Text="{lex:Loc 压缩图像,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <CheckBox Grid.Row="13"
- Grid.Column="1"
- Content="{lex:Loc 是否压缩}"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
- IsChecked="{Binding SelectProcedure.IsCompress,Mode=TwoWay}"
- Style="{StaticResource MaterialDesignLightCheckBox}" />
- <!--是否延迟保存图片-->
- <TextBlock Grid.Row="14"
- Grid.Column="0"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
- Text="{lex:Loc 延迟保存图片,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <CheckBox Grid.Row="14"
- Grid.Column="1"
- Content="{lex:Loc 是否延迟保存图片}"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
- IsChecked="{Binding SelectProcedure.IsDelaySaveImage,Mode=TwoWay}"
- Style="{StaticResource MaterialDesignLightCheckBox}" />
- <!--图片名称格式-->
- <TextBlock Grid.Row="15"
- Grid.Column="0"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
- Text="图片名称格式:" />
- <TextBox Grid.Row="15"
- Grid.Column="1"
- HorizontalAlignment="Stretch"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"
- Text="{Binding SelectProcedure.ImageFileNameFormat,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
- </TextBox>
- <!--示例-->
- <StackPanel Grid.Row="16"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- Orientation="Vertical"
- Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
- <TextBlock Text="示例:{ProductSN}_Daisy_KB Screw _01 _{CameraName}-Locate_{ShotCount}_WhiteRingLight_{Result}_Screw{Number}_{DateTime:yyyy-MM-dd_HH-mm-ss}"
- Foreground="LightGray"
- FontSize="10"
- TextTrimming="CharacterEllipsis"
- TextWrapping="Wrap"
- Width="{Binding Width, ElementName=grid}" />
- <TextBlock Text="转换后的名称:"
- Foreground="Gray"
- FontSize="10" />
- <TextBlock Text="{Binding SelectProcedure.ImageFileNameFormat,Converter={StaticResource ImageFileNameFormatConverter},Mode=TwoWay}"
- Foreground="Gray"
- FontSize="10"
- TextTrimming="CharacterEllipsis"
- TextWrapping="Wrap"
- Width="{Binding Width, ElementName=grid}" />
- </StackPanel>
- <!--自定义参数-->
- <GroupBox Grid.Row="17"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- HorizontalAlignment="Stretch"
- Header="{lex:Loc 自定义参数}"
- FontSize="14"
- Style="{x:Null}">
- <DockPanel>
- <StackPanel DockPanel.Dock="Top"
- Orientation="Horizontal">
- <Button Content="{materialDesign:PackIcon Kind=AddCircle}"
- Style="{StaticResource MahApps.Styles.Button.Flat}"
- Command="{Binding AddUserDefineParameterCommand}" />
- <Button Content="{materialDesign:PackIcon Kind=RemoveCircle}"
- Style="{StaticResource MahApps.Styles.Button.Flat}"
- Margin="5,0"
- Command="{Binding RemoveUserDefineParameterCommand}" />
- </StackPanel>
- <DataGrid HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- SelectedItem="{Binding SelectedUserDefineParam,Mode=TwoWay}"
- ItemsSource="{Binding SelectProcedure.UserDefineParameters,Mode=TwoWay}"
- HeadersVisibility="Column"
- GridLinesVisibility="All"
- CanUserAddRows="False"
- CanUserDeleteRows="False"
- SelectionUnit="FullRow"
- SelectionMode="Single"
- AutoGenerateColumns="False"
- IsReadOnly="False"
- RowHeight="30"
- ColumnWidth="*"
- Height="Auto"
- MinHeight="100"
- MaxHeight="150"
- BorderThickness="1">
- <!-- 提高选中行可见性 -->
- <DataGrid.Resources>
- <Style TargetType="DataGridRow">
- <Setter Property="Background"
- Value="Transparent" />
- <Style.Triggers>
- <Trigger Property="IsSelected"
- Value="True">
- <Setter Property="Background"
- Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
- <Setter Property="Foreground"
- Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
- </Trigger>
- <Trigger Property="IsMouseOver"
- Value="True">
- <Setter Property="Background"
- Value="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.Resources>
- <DataGrid.Columns>
- <DataGridTextColumn Header="{lex:Loc 名称}"
- Width="*"
- MinWidth="100"
- Binding="{Binding ParamName, UpdateSourceTrigger=PropertyChanged}" />
- <DataGridTextColumn Header="{lex:Loc 值}"
- Width="*"
- MinWidth="100"
- Binding="{Binding ParamValue, UpdateSourceTrigger=PropertyChanged}" />
- </DataGrid.Columns>
- </DataGrid>
- </DockPanel>
- </GroupBox>
- <TextBlock Grid.Row="18"
- Grid.Column="0"
- Text="{lex:Loc 重写视觉处理逻辑}" />
- <Button Grid.Row="18"
- Grid.Column="1"
- Margin="0,2,0,0"
- Command="{Binding OverrideVisionTaskCommand}">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="ScriptTextPlayOutline"
- VerticalAlignment="Center" />
- <TextBlock Text="{lex:Loc 脚本}"
- FontSize="{DynamicResource Font.Size.Title4}"
- Margin="8,0,0,0" />
- </StackPanel>
- </Button.Content>
- </Button>
- </Grid>
- </ScrollViewer>
- </Grid>
- <StackPanel Grid.Row="2"
- Orientation="Horizontal"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Margin="20">
- <Button Content="{lex:Loc 返回视觉流程选择界面}"
- IsEnabled="{Binding IsAllowEdit}"
- MinWidth="100"
- Margin="10,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- materialDesign:ButtonAssist.CornerRadius="10"
- Style="{StaticResource MaterialDesignRaisedButton}"
- Command="{Binding NextCommand}" />
- </StackPanel>
- </Grid>
- </UserControl>
|