<UserControl x:Class="MainShell.AlgorithmCalib.View.CameraFusionCalibVerifyView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:MainShell.AlgorithmCalib.View"
             xmlns:mwControls="http://www.maxwell-gp.com/"
             mc:Ignorable="d" 
             xmlns:view="clr-namespace:MainShell.Common.Display.View"
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <ContentControl Grid.Column="0" Content="{Binding CameraAxisViewModelSevice}"/>

        <Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <GroupBox Style="{StaticResource GroupBoxSecondary}"  Margin="3,3,3,3" IsEnabled="{Binding Motion.IsFinish}" Grid.ColumnSpan="2">
                <GroupBox.Header>
                    <TextBlock  Text="WS运动系标定位置" VerticalAlignment="Center" FontWeight="Bold" />
                </GroupBox.Header>
                <UniformGrid Grid.Row="0" Rows="2">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="140"/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Label Content="WS平台标定X1(mm)：" Width="200" Grid.Column="0" Style="{StaticResource CommonLableStyle}" HorizontalAlignment="Right" />
                        <mwControls:NumberBox Tag="WS平台标定X1" Value="{Binding WsFusionCalibParItem.MoveAxisPos}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000"  Grid.Column="1"   HorizontalAlignment="Left" Margin="5" Width="75" Height="35" />
                        <Button Grid.Column="3" Tag="WS平台标定X1-移到此位置" Content="移到此位置" Click="{mwControls:Action btnMoveWSCalibPosPosition}" HorizontalAlignment="Left" />
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1.6*"/>
                            <ColumnDefinition/>
                            <ColumnDefinition />
                            <ColumnDefinition/>
                            <ColumnDefinition Width="1.5*"/>
                        </Grid.ColumnDefinitions>
                        <Label Content="X2：" Grid.Column="0" Style="{StaticResource CommonLableStyle}" HorizontalAlignment="Right" />
                        <mwControls:NumberBox  Value="{Binding WsFusionCalibParItem.ApproachXPos}" IsReadOnly="True" Background="LightGray" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000"  Grid.Column="1"   HorizontalAlignment="Left" Margin="5" Width="75" Height="35" />
                        <Label Content="Y1：" Grid.Column="2" Style="{StaticResource CommonLableStyle}" HorizontalAlignment="Right" />
                        <mwControls:NumberBox  Value="{Binding WsFusionCalibParItem.ApproachYPos}" IsReadOnly="True" Background="LightGray" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000"  Grid.Column="3"   HorizontalAlignment="Left" Margin="5" Width="75" Height="35" />
                        <!--<Button Grid.Column="5" Tag="WS平台标定X1-中心对齐" Content="中心对齐" Click="{mwControls:Action btnApproachWSCalibPosition}"  HorizontalAlignment="Left" />-->
                    </Grid>
                </UniformGrid>
            </GroupBox>
            <GroupBox Grid.Row="2" Style="{StaticResource GroupBoxSecondary}"  Margin="3" IsEnabled="{Binding Motion.IsFinish}">
                <GroupBox.Header>
                    <TextBlock  Text="WS运动位置" VerticalAlignment="Center" FontWeight="Bold" />
                </GroupBox.Header>
                <UniformGrid Rows="5" Columns="1">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Label Content="StartX(mm)：" Grid.Column="0" Style="{StaticResource CommonLableStyle}" HorizontalAlignment="Right" />
                        <mwControls:NumberBox  Value="{Binding WsFusionCalibParItem.StartX}" IsReadOnly="True" Background="LightGray" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000"  Grid.Column="1"   HorizontalAlignment="Left" Margin="5" Width="120" Height="35" />
                        <Label Content="StartY(mm)：" Grid.Column="2" Style="{StaticResource CommonLableStyle}" HorizontalAlignment="Right" />
                        <mwControls:NumberBox  Value="{Binding WsFusionCalibParItem.StartY}" IsReadOnly="True" Background="LightGray" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000"  Grid.Column="3"   HorizontalAlignment="Left" Margin="5" Width="120" Height="35" />
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Button Grid.Column="3"  Content="设置起点" Click="{mwControls:Action btnMoveToCenter}" HorizontalAlignment="Left" />
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Label Content="Step(mm)：" Grid.Column="0" Style="{StaticResource CommonLableStyle}" HorizontalAlignment="Right" />
                        <mwControls:NumberBox  Value="{Binding WsFusionCalibParItem.Step}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000"  Grid.Column="1"   HorizontalAlignment="Left" Margin="5" Width="120" Height="35" />
                        <Button Grid.Column="3"  Content="移动到起点" Click="{mwControls:Action btnMoveToStartPoint}" HorizontalAlignment="Left" />
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Label Content="CountX：" Grid.Column="0" Style="{StaticResource CommonLableStyle}" HorizontalAlignment="Right" />
                        <mwControls:IntNumberBox  Value="{Binding WsFusionCalibParItem.CountX}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000"  Grid.Column="1"   HorizontalAlignment="Left" Margin="5" Width="120" Height="35" />
                        <Label Content="CountY：" Grid.Column="2" Style="{StaticResource CommonLableStyle}" HorizontalAlignment="Right" />
                        <mwControls:IntNumberBox  Value="{Binding WsFusionCalibParItem.CountY}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000"  Grid.Column="3"   HorizontalAlignment="Left" Margin="5" Width="120" Height="35" />
                    </Grid>
                    <Grid>
                        <Button Content="开始飞拍" Click="{mwControls:Action btnMoveWafer}" Grid.Column="0"   Margin="10 5" IsEnabled="{Binding Motion.IsFinish}" />
                    </Grid>
                    <Grid>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                            <Button Content="以当前相机位置验证" Click="{mwControls:Action btnVerifyWafer}"  Margin="10 5" IsEnabled="{Binding Motion.IsFinish}" Width="150"/>
                            <Button Content="停止" Tag="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Content}" Click="{mwControls:Action btnStopVerifyWafer}" HorizontalAlignment="Right"/>
                        </StackPanel>
                    </Grid>
                </UniformGrid>
            </GroupBox>
        </Grid>
    </Grid>
</UserControl>
