| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231 |
- <UserControl x:Class="TeamAAS_VP.Views.Calibration.FixedUpCameraFindP0"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
- xmlns:wf="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
- xmlns:vp="clr-namespace:Cognex.VisionPro.ToolBlock;assembly=Cognex.VisionPro.ToolGroup.Controls"
- xmlns:uControl="clr-namespace:TeamAAS_VP.Controls"
- xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Calibration"
- xmlns:convert="clr-namespace:TeamAAS_VP.ValueConverter"
- 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:FixedUpCameraFindP0ViewModel}"
- 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>
- <UserControl.Resources>
- <convert:JogConverter x:Key="JogConverter" />
- </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="CrosshairsGps"
- Width="30"
- Height="30" />
- <TextBlock Text="{Binding SelectCalibration.Name,Converter={StaticResource StringFormatConverter},ConverterParameter=' [{0}] '}"
- VerticalAlignment="Center" />
- <TextBlock Text="{lex:Loc 校准视觉处理,Converter={StaticResource StringFormatConverter},ConverterParameter='- {0}'}"
- VerticalAlignment="Center" />
- </StackPanel>
- <materialDesign:DrawerHost Grid.Row="1"
- IsEnabled="{Binding IsAllowEdit}"
- OpenMode="Standard"
- x:Name="DrawerHost">
- <materialDesign:DrawerHost.RightDrawerContent>
- <uControl:RobotManual x:Name="robotManual" />
- </materialDesign:DrawerHost.RightDrawerContent>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <wf:WindowsFormsHost Grid.Column="0"
- Margin="0,0,0,35">
- <vp:CogToolBlockEditV2 x:Name="ToolBlockEditV2" />
- </wf:WindowsFormsHost>
- <Button Content="{lex:Loc 运行流程}"
- Width="100"
- HorizontalAlignment="Left"
- VerticalAlignment="Bottom"
- Margin="5,3"
- Command="{Binding RunVisionProcessCommand}" />
- <Grid Grid.Column="1">
- <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" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <TextBlock Text="{lex:Loc 选择下相机}"
- FontWeight="Bold"
- Grid.Row="0"
- VerticalAlignment="Center"
- Grid.Column="0" />
- <ComboBox Grid.Row="0"
- Grid.Column="1"
- ItemsSource="{Binding Cameras}"
- SelectedItem="{Binding SelectCamera}"
- materialDesign:HintAssist.Hint="{lex:Loc 选择相机}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="Camera" />
- <TextBlock Text="{Binding CameraName}"
- Margin="6,0" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <TextBlock Text="{lex:Loc 相机参数设置}"
- Grid.Row="1"
- FontWeight="Bold"
- Margin="0,10"
- Grid.ColumnSpan="2" />
- <TextBlock Grid.Row="2"
- Grid.Column="0"
- Margin="5"
- VerticalAlignment="Center"
- Text="{lex:Loc 曝光时间,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="2"
- Grid.Column="1"
- Margin="5"
- Minimum="35"
- Maximum="999985"
- Interval="35"
- StringFormat="{}{0:N0} us"
- Value="{Binding ExposureTime,Mode=TwoWay}" />
- <TextBlock Grid.Row="3"
- Grid.Column="0"
- Margin="5"
- VerticalAlignment="Center"
- Text="{lex:Loc 增益,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="3"
- Grid.Column="1"
- Margin="5"
- Minimum="0"
- Maximum="63"
- Interval="1"
- StringFormat="{}{0:N2} db"
- Value="{Binding Gain,Mode=TwoWay}" />
- <TextBlock Text="{lex:Loc 选择校准}"
- FontWeight="Bold"
- Grid.Row="4"
- VerticalAlignment="Center"
- Grid.Column="0" />
- <ComboBox Grid.Row="4"
- Grid.Column="1"
- ItemsSource="{Binding CalibrationList}"
- SelectedItem="{Binding SelectedCalibration}"
- materialDesign:HintAssist.Hint="选择校准">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="Camera" />
- <TextBlock Text="{Binding Name}"
- Margin="6,0" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <TextBlock Text="{lex:Loc 获取P0点}"
- FontWeight="Bold"
- Grid.Row="5"
- VerticalAlignment="Center"
- Grid.Column="0" />
- <Button Content="获取P0点"
- Grid.Row="5"
- Margin="0,10"
- Grid.Column="1"
- Command="{Binding FindP0Command}" />
- <TextBlock Grid.Row="6"
- Grid.ColumnSpan="2">
- <TextBlock.Text>
- <MultiBinding StringFormat="{}P0点 X:{0:F3} Y:{2:F3}">
- <Binding Path="SelectCalibration.MarkPoint.X"
- TargetNullValue="0.000"
- FallbackValue="0.000" />
- <Binding Path="SelectCalibration.MarkPoint.Y"
- TargetNullValue="0.000"
- FallbackValue="0.000" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- </Grid>
- </Grid>
- </materialDesign:DrawerHost>
- <StackPanel Orientation="Horizontal"
- HorizontalAlignment="Right"
- VerticalAlignment="Bottom">
- <ToggleButton materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=ArrowRight}"
- Content="{materialDesign:PackIcon Kind=RobotIndustrial}"
- IsEnabled="{Binding IsAllowEdit}"
- Style="{StaticResource MaterialDesignActionToggleButton}"
- ToolTip="{lex:Loc 机器人步进}"
- Margin="2,0"
- IsChecked="{Binding IsRightDrawerOpen,ElementName=DrawerHost}" />
- </StackPanel>
- <StackPanel Grid.Row="2"
- Orientation="Horizontal"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Margin="20">
- <Button Content="{lex:Loc 下一步}"
- IsEnabled="{Binding IsAllowEdit}"
- MinWidth="150"
- Margin="10,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- materialDesign:ButtonAssist.CornerRadius="10"
- Style="{StaticResource MaterialDesignRaisedButton}"
- Command="{Binding NextCommand}" />
- </StackPanel>
- </Grid>
- </UserControl>
|