97 lines
6.8 KiB
XML
97 lines
6.8 KiB
XML
<UserControl x:Class="PLCSharp.VVMs.Vision.VisionFlowHandler.Algorithm.TwoLineIntersect"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:PLCSharp.VVMs.Vision.VisionFlowHandler"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:vision="clr-namespace:PLCSharp.VVMs.Vision"
|
|
mc:Ignorable="d"
|
|
d:DataContext="{d:DesignInstance Type=vision:VisionConfigViewModel}"
|
|
d:DesignHeight="200" d:DesignWidth="300">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<StackPanel>
|
|
<GroupBox Header="参数">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="80" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="0" Text="线1变量" VerticalAlignment="Center" />
|
|
<ComboBox Grid.Row="0" Grid.Column="1"
|
|
ItemsSource="{Binding LineVariables}"
|
|
SelectedValue="{Binding SelectVisionFlow.StringParams[Line1Var], Mode=TwoWay}"
|
|
SelectedValuePath="Name" DisplayMemberPath="Name" />
|
|
<TextBlock Grid.Row="1" Text="线2变量" VerticalAlignment="Center" />
|
|
<ComboBox Grid.Row="1" Grid.Column="1"
|
|
ItemsSource="{Binding LineVariables}"
|
|
SelectedValue="{Binding SelectVisionFlow.StringParams[Line2Var], Mode=TwoWay}"
|
|
SelectedValuePath="Name" DisplayMemberPath="Name" />
|
|
<TextBlock Grid.Row="2" Text="结果变量" VerticalAlignment="Center" />
|
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding SelectVisionFlow.StringParams[IntersectResultVar], Mode=TwoWay, TargetNullValue=两线交点}" />
|
|
<TextBlock Grid.Row="3" Text="交点X" VerticalAlignment="Center" />
|
|
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding SelectedVisionFunction.Params.ResultDoubles[IntersectX], Mode=OneWay}" IsReadOnly="True" Background="#FFF0F0F0" />
|
|
<TextBlock Grid.Row="4" Text="交点Y" VerticalAlignment="Center" />
|
|
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding SelectedVisionFunction.Params.ResultDoubles[IntersectY], Mode=OneWay}" IsReadOnly="True" Background="#FFF0F0F0" />
|
|
<TextBlock Grid.Row="5" Text="夹角°" VerticalAlignment="Center" />
|
|
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding SelectedVisionFunction.Params.ResultDoubles[IntersectAngle], Mode=OneWay}" IsReadOnly="True" Background="#FFF0F0F0" />
|
|
</Grid>
|
|
</GroupBox>
|
|
<GroupBox Header="模板">
|
|
<StackPanel>
|
|
<Button Height="25" Margin="5" Command="{Binding ComputeTwoLineTemplate}" Content="计算模板位置" />
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="60" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="0" Text="模板X" VerticalAlignment="Center" />
|
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding SelectVisionFlow.DoubleParams[TemplateIntersectX], TargetNullValue=—}" IsReadOnly="True" Background="#FFF0F0F0" />
|
|
<TextBlock Grid.Row="1" Text="模板Y" VerticalAlignment="Center" />
|
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding SelectVisionFlow.DoubleParams[TemplateIntersectY], TargetNullValue=—}" IsReadOnly="True" Background="#FFF0F0F0" />
|
|
<TextBlock Grid.Row="2" Text="模板角度" VerticalAlignment="Center" />
|
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding SelectVisionFlow.DoubleParams[TemplateLineAngle], TargetNullValue=—}" IsReadOnly="True" Background="#FFF0F0F0" />
|
|
</Grid>
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="60" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Row="0" Text="偏移X" VerticalAlignment="Center" />
|
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding SelectedVisionFunction.Params.ResultDoubles[IntersectOffX], Mode=OneWay}" IsReadOnly="True" Background="#FFF0F0F0" />
|
|
<TextBlock Grid.Row="1" Text="偏移Y" VerticalAlignment="Center" />
|
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding SelectedVisionFunction.Params.ResultDoubles[IntersectOffY], Mode=OneWay}" IsReadOnly="True" Background="#FFF0F0F0" />
|
|
<TextBlock Grid.Row="2" Text="角度偏差" VerticalAlignment="Center" />
|
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding SelectedVisionFunction.Params.ResultDoubles[IntersectOffAngle], Mode=OneWay}" IsReadOnly="True" Background="#FFF0F0F0" />
|
|
</Grid>
|
|
<Grid Margin="5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="75" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="偏移变量" VerticalAlignment="Center" />
|
|
<TextBox Grid.Column="1" Text="{Binding SelectVisionFlow.StringParams[IntersectOffsetVar], Mode=TwoWay, TargetNullValue=两线交点_Offset}" />
|
|
</Grid>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</UserControl>
|