|
|
@@ -21,8 +21,8 @@
|
|
|
d:DataContext="{d:DesignInstance Type=vm:VisionDynamicAccuracyAnalyzerViewModel}"
|
|
|
d:Height="1080"
|
|
|
d:Width="1920"
|
|
|
- MinHeight="768"
|
|
|
- MinWidth="1024"
|
|
|
+ MinHeight="500"
|
|
|
+ MinWidth="500"
|
|
|
d:Background="White"
|
|
|
HorizontalAlignment="Stretch"
|
|
|
VerticalAlignment="Stretch"
|
|
|
@@ -36,6 +36,10 @@
|
|
|
Value="True" />
|
|
|
<Setter Property="ShowInTaskbar"
|
|
|
Value="True" />
|
|
|
+ <Setter Property="MinHeight"
|
|
|
+ Value="500" />
|
|
|
+ <Setter Property="MinWidth"
|
|
|
+ Value="500" />
|
|
|
<Setter Property="WindowState"
|
|
|
Value="Maximized" />
|
|
|
<Setter Property="Topmost"
|
|
|
@@ -109,464 +113,486 @@
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<!-- 左侧控制面板 -->
|
|
|
- <Border Grid.Column="0"
|
|
|
- BorderBrush="#BDC3C7"
|
|
|
- BorderThickness="0 0 1 0">
|
|
|
- <Grid>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- <RowDefinition Height="*"
|
|
|
- MinHeight="100" />
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
-
|
|
|
- <!-- 机器人位置设置 -->
|
|
|
- <Border Grid.Row="0"
|
|
|
- Background="#ECF0F1"
|
|
|
- Padding="10">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Style="{StaticResource TitleStyle}"
|
|
|
- Text="机器人位置设置" />
|
|
|
-
|
|
|
- <Grid Margin="0 10 0 0">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
+ <ScrollViewer >
|
|
|
+ <Border Grid.Column="0"
|
|
|
+ BorderBrush="#BDC3C7"
|
|
|
+ BorderThickness="0 0 1 0">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="*"
|
|
|
+ MinHeight="150" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
|
|
- <!-- A点坐标 -->
|
|
|
- <Grid Grid.Row="0"
|
|
|
- Margin="0 0 0 10">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
+ <!-- 机器人位置设置 -->
|
|
|
+ <Border Grid.Row="0"
|
|
|
+ Background="#ECF0F1"
|
|
|
+ Padding="10">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Style="{StaticResource TitleStyle}"
|
|
|
+ Text="机器人位置设置" />
|
|
|
+
|
|
|
+ <Grid Margin="0 10 0 0">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <!-- A点坐标 -->
|
|
|
+ <Grid Grid.Row="0"
|
|
|
+ Margin="0 0 0 10">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
|
|
- <TextBlock Text="A点坐标:"
|
|
|
- Grid.Column="0"
|
|
|
- VerticalAlignment="Center" />
|
|
|
- <TextBox Grid.Column="1"
|
|
|
- Text="{Binding PointA, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- d:Text="X:0.000 Y:0.000 Z:0.000 U:0.000 V:0.000 W:0.000"
|
|
|
- ToolTip="机器人A点位置坐标"
|
|
|
- IsReadOnly="True"
|
|
|
- Background="#F8F9FA" />
|
|
|
- <Button Grid.Column="2"
|
|
|
- Content="示教"
|
|
|
- Command="{Binding TeachPointACommand}"
|
|
|
- Background="#3498DB"
|
|
|
- Foreground="White"
|
|
|
- Width="60"
|
|
|
- Margin="5,0,0,0" />
|
|
|
- </Grid>
|
|
|
+ <TextBlock Text="A点坐标:"
|
|
|
+ Grid.Column="0"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBox Grid.Column="1"
|
|
|
+ d:Text="X:0.000 Y:0.000 Z:0.000 U:0.000 V:0.000 W:0.000"
|
|
|
+ ToolTip="机器人A点位置坐标"
|
|
|
+ IsReadOnly="True"
|
|
|
+ Background="#F8F9FA">
|
|
|
+ <TextBox.Text>
|
|
|
+ <MultiBinding StringFormat="X:{0:f3} Y:{1:f3} Z:{2:f3} U:{3:f3} V:{4:f3} W:{5:f3}">
|
|
|
+ <Binding Path="PointA.X"/>
|
|
|
+ <Binding Path="PointA.Y"/>
|
|
|
+ <Binding Path="PointA.Z"/>
|
|
|
+ <Binding Path="PointA.U"/>
|
|
|
+ <Binding Path="PointA.V"/>
|
|
|
+ <Binding Path="PointA.W"/>
|
|
|
+ </MultiBinding>
|
|
|
+ </TextBox.Text>
|
|
|
+ </TextBox>
|
|
|
+ <Button Grid.Column="2"
|
|
|
+ Content="示教"
|
|
|
+ Command="{Binding TeachPointACommand}"
|
|
|
+ Background="#3498DB"
|
|
|
+ Foreground="White"
|
|
|
+ Width="60"
|
|
|
+ Margin="5,0,0,0" />
|
|
|
+ </Grid>
|
|
|
|
|
|
- <!-- B点坐标 -->
|
|
|
- <Grid Grid.Row="1"
|
|
|
- Margin="0 0 0 10">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
+ <!-- B点坐标 -->
|
|
|
+ <Grid Grid.Row="1"
|
|
|
+ Margin="0 0 0 10">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
|
|
- <TextBlock Text="B点坐标:"
|
|
|
- Grid.Column="0"
|
|
|
- VerticalAlignment="Center" />
|
|
|
- <TextBox Grid.Column="1"
|
|
|
- Text="{Binding PointB, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- d:Text="X:100.000 Y:50.000 Z:0.000 U:0.000 V:0.000 W:0.000"
|
|
|
- ToolTip="机器人B点拍照位置坐标"
|
|
|
- IsReadOnly="True"
|
|
|
- Background="#F8F9FA" />
|
|
|
- <Button Grid.Column="2"
|
|
|
- Content="示教"
|
|
|
- Command="{Binding TeachPointBCommand}"
|
|
|
- Background="#3498DB"
|
|
|
- Foreground="White"
|
|
|
- Width="60"
|
|
|
- Margin="5,0,0,0" />
|
|
|
+ <TextBlock Text="B点坐标:"
|
|
|
+ Grid.Column="0"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBox Grid.Column="1"
|
|
|
+ d:Text="X:100.000 Y:50.000 Z:0.000 U:0.000 V:0.000 W:0.000"
|
|
|
+ ToolTip="机器人B点拍照位置坐标"
|
|
|
+ IsReadOnly="True"
|
|
|
+ Background="#F8F9FA" >
|
|
|
+ <TextBox.Text>
|
|
|
+ <MultiBinding StringFormat="X:{0:f3} Y:{1:f3} Z:{2:f3} U:{3:f3} V:{4:f3} W:{5:f3}">
|
|
|
+ <Binding Path="PointB.X"/>
|
|
|
+ <Binding Path="PointB.Y"/>
|
|
|
+ <Binding Path="PointB.Z"/>
|
|
|
+ <Binding Path="PointB.U"/>
|
|
|
+ <Binding Path="PointB.V"/>
|
|
|
+ <Binding Path="PointB.W"/>
|
|
|
+ </MultiBinding>
|
|
|
+ </TextBox.Text>
|
|
|
+ </TextBox>
|
|
|
+ <Button Grid.Column="2"
|
|
|
+ Content="示教"
|
|
|
+ Command="{Binding TeachPointBCommand}"
|
|
|
+ Background="#3498DB"
|
|
|
+ Foreground="White"
|
|
|
+ Width="60"
|
|
|
+ Margin="5,0,0,0" />
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <!-- 视觉流程选择 -->
|
|
|
+ <Grid Grid.Row="2">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <TextBlock Text="视觉流程:"
|
|
|
+ Grid.Column="0"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <ComboBox Grid.Column="1"
|
|
|
+ ItemsSource="{Binding ProcedureModels}"
|
|
|
+ SelectedItem="{Binding SelectProcedure, Mode=TwoWay}"
|
|
|
+ ToolTip="选择视觉处理流程">
|
|
|
+ <ComboBox.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Name}" />
|
|
|
+ </DataTemplate>
|
|
|
+ </ComboBox.ItemTemplate>
|
|
|
+ <b:Interaction.Triggers>
|
|
|
+ <b:EventTrigger EventName="SelectionChanged">
|
|
|
+ <b:InvokeCommandAction Command="{Binding ProcedureSelectionChangedCommand}" />
|
|
|
+ </b:EventTrigger>
|
|
|
+ </b:Interaction.Triggers>
|
|
|
+ </ComboBox>
|
|
|
+ </Grid>
|
|
|
</Grid>
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <!-- 测试参数设置 -->
|
|
|
+ <Border Grid.Row="1"
|
|
|
+ Background="#F8F9FA"
|
|
|
+ Padding="10">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Style="{StaticResource TitleStyle}"
|
|
|
+ Text="测试参数设置" />
|
|
|
|
|
|
- <!-- 视觉流程选择 -->
|
|
|
- <Grid Grid.Row="2">
|
|
|
+ <Grid Margin="0 10 0 0">
|
|
|
<Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
<ColumnDefinition Width="*" />
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
- <TextBlock Text="视觉流程:"
|
|
|
- Grid.Column="0"
|
|
|
- VerticalAlignment="Center" />
|
|
|
- <ComboBox Grid.Column="1"
|
|
|
- ItemsSource="{Binding ProcedureModels}"
|
|
|
- SelectedItem="{Binding SelectProcedure, Mode=TwoWay}"
|
|
|
- ToolTip="选择视觉处理流程">
|
|
|
- <ComboBox.ItemTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <TextBlock Text="{Binding Name}" />
|
|
|
- </DataTemplate>
|
|
|
- </ComboBox.ItemTemplate>
|
|
|
- <b:Interaction.Triggers>
|
|
|
- <b:EventTrigger EventName="SelectionChanged">
|
|
|
- <b:InvokeCommandAction Command="{Binding ProcedureSelectionChangedCommand}" />
|
|
|
- </b:EventTrigger>
|
|
|
- </b:Interaction.Triggers>
|
|
|
- </ComboBox>
|
|
|
+ <!-- 重复次数 -->
|
|
|
+ <StackPanel Grid.Column="0">
|
|
|
+ <TextBlock Text="重复次数:" />
|
|
|
+ <mah:NumericUpDown Value="{Binding RepeatCount, Mode=TwoWay}"
|
|
|
+ Minimum="1"
|
|
|
+ Maximum="1000"
|
|
|
+ d:Value="50"
|
|
|
+ TextAlignment="Center"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ IsEnabled="{Binding IsRunning, Converter={StaticResource InvertBooleanConverter}}" />
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <!-- 移动速度 -->
|
|
|
+ <StackPanel Grid.Column="1"
|
|
|
+ Margin="10,0,0,0">
|
|
|
+ <TextBlock Text="移动速度(%):" />
|
|
|
+ <mah:NumericUpDown Value="{Binding MoveSpeed, Mode=TwoWay}"
|
|
|
+ Minimum="1"
|
|
|
+ Maximum="100"
|
|
|
+ d:Value="50"
|
|
|
+ TextAlignment="Center"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ IsEnabled="{Binding IsRunning, Converter={StaticResource InvertBooleanConverter}}" />
|
|
|
+ </StackPanel>
|
|
|
</Grid>
|
|
|
- </Grid>
|
|
|
- </StackPanel>
|
|
|
- </Border>
|
|
|
|
|
|
- <!-- 测试参数设置 -->
|
|
|
- <Border Grid.Row="1"
|
|
|
- Background="#F8F9FA"
|
|
|
- Padding="10">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Style="{StaticResource TitleStyle}"
|
|
|
- Text="测试参数设置" />
|
|
|
|
|
|
- <Grid Margin="0 10 0 0">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
|
|
|
- <!-- 重复次数 -->
|
|
|
- <StackPanel Grid.Column="0">
|
|
|
- <TextBlock Text="重复次数:" />
|
|
|
- <mah:NumericUpDown Value="{Binding RepeatCount, Mode=TwoWay}"
|
|
|
- Minimum="1"
|
|
|
- Maximum="1000"
|
|
|
- d:Value="50"
|
|
|
- TextAlignment="Center"
|
|
|
- HorizontalContentAlignment="Center"
|
|
|
- HorizontalAlignment="Stretch"
|
|
|
- IsEnabled="{Binding IsRunning, Converter={StaticResource InvertBooleanConverter}}" />
|
|
|
- </StackPanel>
|
|
|
+ <!-- 测试控制区域 -->
|
|
|
+ <Border Grid.Row="2"
|
|
|
+ Background="#ECF0F1"
|
|
|
+ Padding="10">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Style="{StaticResource TitleStyle}"
|
|
|
+ Text="测试控制" />
|
|
|
+
|
|
|
+ <WrapPanel HorizontalAlignment="Center"
|
|
|
+ Margin="0 10 0 0">
|
|
|
+ <Button Content="单次测试"
|
|
|
+ Background="#3498DB"
|
|
|
+ Foreground="White"
|
|
|
+ MinWidth="100"
|
|
|
+ Height="35"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Command="{Binding SingleTestCommand}"
|
|
|
+ IsEnabled="{Binding IsRunning, Converter={StaticResource InvertBooleanConverter}}" />
|
|
|
+
|
|
|
+ <Button Content="连续测试"
|
|
|
+ Background="#27AE60"
|
|
|
+ Foreground="White"
|
|
|
+ MinWidth="100"
|
|
|
+ Height="35"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Command="{Binding StartTestCommand}" />
|
|
|
+
|
|
|
+ <Button Content="停止"
|
|
|
+ Background="#E74C3C"
|
|
|
+ Foreground="White"
|
|
|
+ MinWidth="100"
|
|
|
+ Height="35"
|
|
|
+ Command="{Binding StopTestCommand}" />
|
|
|
+
|
|
|
+ <Button Content="暂停"
|
|
|
+ Background="#F39C12"
|
|
|
+ Foreground="White"
|
|
|
+ MinWidth="100"
|
|
|
+ Height="35"
|
|
|
+ Command="{Binding PauseTestCommand}" />
|
|
|
+ </WrapPanel>
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
|
|
|
- <!-- 移动速度 -->
|
|
|
- <StackPanel Grid.Column="1"
|
|
|
- Margin="10,0,0,0">
|
|
|
- <TextBlock Text="移动速度(%):" />
|
|
|
- <mah:NumericUpDown Value="{Binding MoveSpeed, Mode=TwoWay}"
|
|
|
- Minimum="1"
|
|
|
- Maximum="100"
|
|
|
- d:Value="50"
|
|
|
- TextAlignment="Center"
|
|
|
- HorizontalContentAlignment="Center"
|
|
|
- HorizontalAlignment="Stretch"
|
|
|
- IsEnabled="{Binding IsRunning, Converter={StaticResource InvertBooleanConverter}}" />
|
|
|
- </StackPanel>
|
|
|
- </Grid>
|
|
|
+ <!-- 进度显示 -->
|
|
|
+ <Border Grid.Row="3"
|
|
|
+ Background="White"
|
|
|
+ Padding="10">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Style="{StaticResource TitleStyle}"
|
|
|
+ Text="测试进度" />
|
|
|
+
|
|
|
+ <Grid Margin="0 10 0 0">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <ProgressBar Grid.Row="0"
|
|
|
+ Height="25"
|
|
|
+ Margin="5"
|
|
|
+ Minimum="0"
|
|
|
+ Maximum="{Binding RepeatCount}"
|
|
|
+ Value="{Binding CurrentProgress}"
|
|
|
+ IsEnabled="False"
|
|
|
+ d:Maximum="100"
|
|
|
+ d:Value="50" />
|
|
|
+
|
|
|
+ <TextBlock Grid.Row="1"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ FontSize="12"
|
|
|
+ Foreground="#7F8C8D"
|
|
|
+ d:Text="等待开始..."
|
|
|
+ Text="{Binding Message}" />
|
|
|
+ </Grid>
|
|
|
|
|
|
+ <!-- 实时统计信息 -->
|
|
|
+ <WrapPanel Margin="0 15 0 0"
|
|
|
+ HorizontalAlignment="Center">
|
|
|
+ <Border Background="#3498DB"
|
|
|
+ Padding="10 5"
|
|
|
+ Margin="5"
|
|
|
+ CornerRadius="3">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Text="当前循环"
|
|
|
+ Foreground="White"
|
|
|
+ FontSize="11" />
|
|
|
+ <TextBlock Text="{Binding CurrentProgress}"
|
|
|
+ d:Text="1"
|
|
|
+ Foreground="White"
|
|
|
+ FontSize="16"
|
|
|
+ FontWeight="Bold"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <Border Background="#2ECC71"
|
|
|
+ Padding="10 5"
|
|
|
+ Margin="5"
|
|
|
+ CornerRadius="3">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Text="成功率"
|
|
|
+ Foreground="White"
|
|
|
+ FontSize="11" />
|
|
|
+ <TextBlock Text="{Binding SuccessRate, StringFormat={}{0:F1}%}"
|
|
|
+ d:Text="100%"
|
|
|
+ Foreground="White"
|
|
|
+ FontSize="16"
|
|
|
+ FontWeight="Bold"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <Border Background="#9B59B6"
|
|
|
+ Padding="10 5"
|
|
|
+ Margin="5"
|
|
|
+ CornerRadius="3">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Text="往返时间"
|
|
|
+ Foreground="White"
|
|
|
+ FontSize="11" />
|
|
|
+ <TextBlock Text="{Binding CycleTime, StringFormat={}{0:F2}s}"
|
|
|
+ d:Text="2.34s"
|
|
|
+ Foreground="White"
|
|
|
+ FontSize="16"
|
|
|
+ FontWeight="Bold"
|
|
|
+ HorizontalAlignment="Center" />
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+ </WrapPanel>
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
|
|
|
- </StackPanel>
|
|
|
- </Border>
|
|
|
-
|
|
|
- <!-- 测试控制区域 -->
|
|
|
- <Border Grid.Row="2"
|
|
|
- Background="#ECF0F1"
|
|
|
- Padding="10">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Style="{StaticResource TitleStyle}"
|
|
|
- Text="测试控制" />
|
|
|
-
|
|
|
- <WrapPanel HorizontalAlignment="Center"
|
|
|
- Margin="0 10 0 0">
|
|
|
- <Button Content="单次测试"
|
|
|
- Background="#3498DB"
|
|
|
- Foreground="White"
|
|
|
- MinWidth="100"
|
|
|
- Height="35"
|
|
|
- FontWeight="Bold"
|
|
|
- Command="{Binding SingleTestCommand}"
|
|
|
- IsEnabled="{Binding IsRunning, Converter={StaticResource InvertBooleanConverter}}" />
|
|
|
-
|
|
|
- <Button Content="连续测试"
|
|
|
- Background="#27AE60"
|
|
|
- Foreground="White"
|
|
|
- MinWidth="100"
|
|
|
- Height="35"
|
|
|
- FontWeight="Bold"
|
|
|
- Command="{Binding StartTestCommand}" />
|
|
|
-
|
|
|
- <Button Content="停止"
|
|
|
- Background="#E74C3C"
|
|
|
- Foreground="White"
|
|
|
- MinWidth="100"
|
|
|
- Height="35"
|
|
|
- Command="{Binding StopTestCommand}" />
|
|
|
-
|
|
|
- <Button Content="暂停"
|
|
|
- Background="#F39C12"
|
|
|
- Foreground="White"
|
|
|
- MinWidth="100"
|
|
|
- Height="35"
|
|
|
- Command="{Binding PauseTestCommand}" />
|
|
|
- </WrapPanel>
|
|
|
- </StackPanel>
|
|
|
- </Border>
|
|
|
-
|
|
|
- <!-- 进度显示 -->
|
|
|
- <Border Grid.Row="3"
|
|
|
- Background="White"
|
|
|
- Padding="10">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Style="{StaticResource TitleStyle}"
|
|
|
- Text="测试进度" />
|
|
|
-
|
|
|
- <Grid Margin="0 10 0 0">
|
|
|
+ <!-- 测试结果列表 -->
|
|
|
+ <Border Grid.Row="4"
|
|
|
+ Background="White"
|
|
|
+ Padding="10">
|
|
|
+ <Grid>
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="Auto" />
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="*" />
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
- <ProgressBar Grid.Row="0"
|
|
|
- Height="25"
|
|
|
- Margin="5"
|
|
|
- Minimum="0"
|
|
|
- Maximum="{Binding RepeatCount}"
|
|
|
- Value="{Binding CurrentProgress}"
|
|
|
- IsEnabled="False"
|
|
|
- d:Maximum="100"
|
|
|
- d:Value="50" />
|
|
|
-
|
|
|
- <TextBlock Grid.Row="1"
|
|
|
- HorizontalAlignment="Center"
|
|
|
- FontSize="12"
|
|
|
- Foreground="#7F8C8D"
|
|
|
- d:Text="等待开始..."
|
|
|
- Text="{Binding Message}" />
|
|
|
- </Grid>
|
|
|
-
|
|
|
- <!-- 实时统计信息 -->
|
|
|
- <WrapPanel Margin="0 15 0 0"
|
|
|
- HorizontalAlignment="Center">
|
|
|
- <Border Background="#3498DB"
|
|
|
- Padding="10 5"
|
|
|
- Margin="5"
|
|
|
- CornerRadius="3">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Text="当前循环"
|
|
|
- Foreground="White"
|
|
|
- FontSize="11" />
|
|
|
- <TextBlock Text="{Binding CurrentProgress}"
|
|
|
- d:Text="1"
|
|
|
- Foreground="White"
|
|
|
- FontSize="16"
|
|
|
- FontWeight="Bold"
|
|
|
- HorizontalAlignment="Center" />
|
|
|
- </StackPanel>
|
|
|
- </Border>
|
|
|
+ <StackPanel Grid.Row="0"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock Style="{StaticResource TitleStyle}"
|
|
|
+ Text="测试结果列表" />
|
|
|
+ <TextBlock Margin="10,0,0,0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Foreground="#7F8C8D"
|
|
|
+ Text="(显示最近20次结果)" />
|
|
|
+ </StackPanel>
|
|
|
|
|
|
- <Border Background="#2ECC71"
|
|
|
- Padding="10 5"
|
|
|
- Margin="5"
|
|
|
- CornerRadius="3">
|
|
|
+ <DataGrid x:Name="dgResults"
|
|
|
+ Grid.Row="1"
|
|
|
+ Style="{StaticResource DataGridStyle}"
|
|
|
+ MaxHeight="250"
|
|
|
+ AutoGenerateColumns="False"
|
|
|
+ CanUserAddRows="False"
|
|
|
+ IsReadOnly="True"
|
|
|
+ ItemsSource="{Binding TestResults}">
|
|
|
+ <DataGrid.Columns>
|
|
|
+ <DataGridTextColumn Header="序号"
|
|
|
+ Binding="{Binding Index}"
|
|
|
+ MinWidth="50" />
|
|
|
+ <DataGridTextColumn Header="状态"
|
|
|
+ Binding="{Binding IsPhotoSuccess}"
|
|
|
+ MinWidth="60" />
|
|
|
+ <DataGridTextColumn Header="像素X"
|
|
|
+ Binding="{Binding PixelX, StringFormat={}{0:F3}}"
|
|
|
+ MinWidth="70" />
|
|
|
+ <DataGridTextColumn Header="像素Y"
|
|
|
+ Binding="{Binding PixelY, StringFormat={}{0:F3}}"
|
|
|
+ MinWidth="70" />
|
|
|
+ <DataGridTextColumn Header="角度"
|
|
|
+ Binding="{Binding AngleU, StringFormat={}{0:F2}}"
|
|
|
+ MinWidth="60" />
|
|
|
+ <DataGridTextColumn Header="绝对X"
|
|
|
+ Binding="{Binding TransformX, StringFormat={}{0:F3}}"
|
|
|
+ MinWidth="70" />
|
|
|
+ <DataGridTextColumn Header="绝对Y"
|
|
|
+ Binding="{Binding TransformY, StringFormat={}{0:F3}}"
|
|
|
+ MinWidth="70" />
|
|
|
+ <DataGridTextColumn Header="循环时间"
|
|
|
+ Binding="{Binding CycleTime, StringFormat={}{0:F2}s}"
|
|
|
+ MinWidth="80" />
|
|
|
+ <DataGridTextColumn Header="时间戳"
|
|
|
+ Binding="{Binding Timestamp}"
|
|
|
+ MinWidth="120" />
|
|
|
+ </DataGrid.Columns>
|
|
|
+ </DataGrid>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <!-- 导出和精度分析 -->
|
|
|
+ <Border Grid.Row="5"
|
|
|
+ Background="#ECF0F1"
|
|
|
+ Padding="10">
|
|
|
+ <StackPanel>
|
|
|
+ <!-- 导出按钮 -->
|
|
|
+ <WrapPanel HorizontalAlignment="Right">
|
|
|
+ <Button Content="导出CSV"
|
|
|
+ Background="#3498DB"
|
|
|
+ Foreground="White"
|
|
|
+ MinWidth="100"
|
|
|
+ Command="{Binding ExportCSVCommand}" />
|
|
|
+
|
|
|
+ <Button Content="生成报告"
|
|
|
+ Background="#9B59B6"
|
|
|
+ Foreground="White"
|
|
|
+ MinWidth="100"
|
|
|
+ Command="{Binding ExportReportCommand}" />
|
|
|
+
|
|
|
+ <Button Content="清空数据"
|
|
|
+ Background="#95A5A6"
|
|
|
+ Foreground="White"
|
|
|
+ MinWidth="100"
|
|
|
+ Command="{Binding ClearDataCommand}" />
|
|
|
+ </WrapPanel>
|
|
|
+
|
|
|
+ <!-- 动态精度分析 -->
|
|
|
+ <Border Margin="0 10 0 0"
|
|
|
+ Background="#F8F9FA"
|
|
|
+ Padding="10"
|
|
|
+ CornerRadius="5">
|
|
|
<StackPanel>
|
|
|
- <TextBlock Text="成功率"
|
|
|
- Foreground="White"
|
|
|
- FontSize="11" />
|
|
|
- <TextBlock Text="{Binding SuccessRate, StringFormat={}{0:F1}%}"
|
|
|
- d:Text="100%"
|
|
|
- Foreground="White"
|
|
|
- FontSize="16"
|
|
|
- FontWeight="Bold"
|
|
|
- HorizontalAlignment="Center" />
|
|
|
- </StackPanel>
|
|
|
- </Border>
|
|
|
+ <TextBlock Text="动态重复精度分析"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Margin="0 0 0 5" />
|
|
|
+
|
|
|
+ <Grid Margin="0 5 0 0">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <StackPanel Grid.Column="0">
|
|
|
+ <TextBlock>
|
|
|
+ <Run Text="X方向精度: " />
|
|
|
+ <Run Text="{Binding PrecisionResult.XPrecision, StringFormat={}{0:F3}mm}"
|
|
|
+ d:Text="0.023mm"
|
|
|
+ Foreground="#2C3E50"
|
|
|
+ FontWeight="Bold" />
|
|
|
+ </TextBlock>
|
|
|
+ <TextBlock>
|
|
|
+ <Run Text="Y方向精度: " />
|
|
|
+ <Run Text="{Binding PrecisionResult.YPrecision, StringFormat={}{0:F3}mm}"
|
|
|
+ d:Text="0.018mm"
|
|
|
+ Foreground="#2C3E50"
|
|
|
+ FontWeight="Bold" />
|
|
|
+ </TextBlock>
|
|
|
+ <TextBlock>
|
|
|
+ <Run Text="角度精度: " />
|
|
|
+ <Run Text="{Binding PrecisionResult.AnglePrecision, StringFormat={}{0:F2}°}"
|
|
|
+ d:Text="0.12°"
|
|
|
+ Foreground="#2C3E50"
|
|
|
+ FontWeight="Bold" />
|
|
|
+ </TextBlock>
|
|
|
+ </StackPanel>
|
|
|
|
|
|
- <Border Background="#9B59B6"
|
|
|
- Padding="10 5"
|
|
|
- Margin="5"
|
|
|
- CornerRadius="3">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Text="往返时间"
|
|
|
- Foreground="White"
|
|
|
- FontSize="11" />
|
|
|
- <TextBlock Text="{Binding CycleTime, StringFormat={}{0:F2}s}"
|
|
|
- d:Text="2.34s"
|
|
|
- Foreground="White"
|
|
|
- FontSize="16"
|
|
|
- FontWeight="Bold"
|
|
|
- HorizontalAlignment="Center" />
|
|
|
+ <StackPanel Grid.Column="1">
|
|
|
+ <TextBlock>
|
|
|
+ <Run Text="3σ范围: " />
|
|
|
+ <Run Text="{Binding PrecisionResult.OverallThreeSigmaRange, StringFormat={}±{0:F3}mm}"
|
|
|
+ d:Text="±0.065mm"
|
|
|
+ Foreground="#2C3E50"
|
|
|
+ FontWeight="Bold" />
|
|
|
+ </TextBlock>
|
|
|
+ <TextBlock>
|
|
|
+ <Run Text="CPK: " />
|
|
|
+ <Run Text="{Binding PrecisionResult.OverallPrecision, StringFormat={}{0:F2}}"
|
|
|
+ d:Text="1.85"
|
|
|
+ Foreground="#2C3E50"
|
|
|
+ FontWeight="Bold" />
|
|
|
+ </TextBlock>
|
|
|
+ <TextBlock>
|
|
|
+ <Run Text="评级: " />
|
|
|
+ <Run Text="{Binding ProcessRating}"
|
|
|
+ d:Text="优秀"
|
|
|
+ Foreground="#27AE60"
|
|
|
+ FontWeight="Bold" />
|
|
|
+ </TextBlock>
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <!-- 趋势图按钮 -->
|
|
|
+ <Button Content="显示趋势图"
|
|
|
+ Background="#E67E22"
|
|
|
+ Foreground="White"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Margin="0 10 0 0"
|
|
|
+ MinWidth="100"
|
|
|
+ Command="{Binding ShowTrendChartCommand}" />
|
|
|
</StackPanel>
|
|
|
</Border>
|
|
|
- </WrapPanel>
|
|
|
- </StackPanel>
|
|
|
- </Border>
|
|
|
-
|
|
|
- <!-- 测试结果列表 -->
|
|
|
- <Border Grid.Row="4"
|
|
|
- Background="White"
|
|
|
- Padding="10">
|
|
|
- <Grid>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- <RowDefinition Height="*" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
-
|
|
|
- <StackPanel Grid.Row="0"
|
|
|
- Orientation="Horizontal">
|
|
|
- <TextBlock Style="{StaticResource TitleStyle}"
|
|
|
- Text="测试结果列表" />
|
|
|
- <TextBlock Margin="10,0,0,0"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Foreground="#7F8C8D"
|
|
|
- Text="(显示最近20次结果)" />
|
|
|
</StackPanel>
|
|
|
-
|
|
|
- <DataGrid x:Name="dgResults"
|
|
|
- Grid.Row="1"
|
|
|
- Style="{StaticResource DataGridStyle}"
|
|
|
- MaxHeight="250"
|
|
|
- AutoGenerateColumns="False"
|
|
|
- CanUserAddRows="False"
|
|
|
- IsReadOnly="True"
|
|
|
- ItemsSource="{Binding TestResults}">
|
|
|
- <DataGrid.Columns>
|
|
|
- <DataGridTextColumn Header="序号"
|
|
|
- Binding="{Binding Index}"
|
|
|
- MinWidth="50" />
|
|
|
- <DataGridTextColumn Header="状态"
|
|
|
- Binding="{Binding IsPhotoSuccess}"
|
|
|
- MinWidth="60" />
|
|
|
- <DataGridTextColumn Header="像素X"
|
|
|
- Binding="{Binding PixelX, StringFormat={}{0:F3}}"
|
|
|
- MinWidth="70" />
|
|
|
- <DataGridTextColumn Header="像素Y"
|
|
|
- Binding="{Binding PixelY, StringFormat={}{0:F3}}"
|
|
|
- MinWidth="70" />
|
|
|
- <DataGridTextColumn Header="角度"
|
|
|
- Binding="{Binding AngleU, StringFormat={}{0:F2}}"
|
|
|
- MinWidth="60" />
|
|
|
- <DataGridTextColumn Header="绝对X"
|
|
|
- Binding="{Binding TransformX, StringFormat={}{0:F3}}"
|
|
|
- MinWidth="70" />
|
|
|
- <DataGridTextColumn Header="绝对Y"
|
|
|
- Binding="{Binding TransformY, StringFormat={}{0:F3}}"
|
|
|
- MinWidth="70" />
|
|
|
- <DataGridTextColumn Header="循环时间"
|
|
|
- Binding="{Binding CycleTime, StringFormat={}{0:F2}s}"
|
|
|
- MinWidth="80" />
|
|
|
- <DataGridTextColumn Header="时间戳"
|
|
|
- Binding="{Binding Timestamp}"
|
|
|
- MinWidth="120" />
|
|
|
- </DataGrid.Columns>
|
|
|
- </DataGrid>
|
|
|
- </Grid>
|
|
|
- </Border>
|
|
|
-
|
|
|
- <!-- 导出和精度分析 -->
|
|
|
- <Border Grid.Row="5"
|
|
|
- Background="#ECF0F1"
|
|
|
- Padding="10">
|
|
|
- <StackPanel>
|
|
|
- <!-- 导出按钮 -->
|
|
|
- <WrapPanel HorizontalAlignment="Right">
|
|
|
- <Button Content="导出CSV"
|
|
|
- Background="#3498DB"
|
|
|
- Foreground="White"
|
|
|
- MinWidth="100"
|
|
|
- Command="{Binding ExportCSVCommand}" />
|
|
|
-
|
|
|
- <Button Content="生成报告"
|
|
|
- Background="#9B59B6"
|
|
|
- Foreground="White"
|
|
|
- MinWidth="100"
|
|
|
- Command="{Binding ExportReportCommand}" />
|
|
|
-
|
|
|
- <Button Content="清空数据"
|
|
|
- Background="#95A5A6"
|
|
|
- Foreground="White"
|
|
|
- MinWidth="100"
|
|
|
- Command="{Binding ClearDataCommand}" />
|
|
|
- </WrapPanel>
|
|
|
-
|
|
|
- <!-- 动态精度分析 -->
|
|
|
- <Border Margin="0 10 0 0"
|
|
|
- Background="#F8F9FA"
|
|
|
- Padding="10"
|
|
|
- CornerRadius="5">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Text="动态重复精度分析"
|
|
|
- FontWeight="Bold"
|
|
|
- Margin="0 0 0 5" />
|
|
|
-
|
|
|
- <Grid Margin="0 5 0 0">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
-
|
|
|
- <StackPanel Grid.Column="0">
|
|
|
- <TextBlock>
|
|
|
- <Run Text="X方向精度: " />
|
|
|
- <Run Text="{Binding PrecisionResult.XPrecision, StringFormat={}{0:F3}mm}"
|
|
|
- d:Text="0.023mm"
|
|
|
- Foreground="#2C3E50"
|
|
|
- FontWeight="Bold" />
|
|
|
- </TextBlock>
|
|
|
- <TextBlock>
|
|
|
- <Run Text="Y方向精度: " />
|
|
|
- <Run Text="{Binding PrecisionResult.YPrecision, StringFormat={}{0:F3}mm}"
|
|
|
- d:Text="0.018mm"
|
|
|
- Foreground="#2C3E50"
|
|
|
- FontWeight="Bold" />
|
|
|
- </TextBlock>
|
|
|
- <TextBlock>
|
|
|
- <Run Text="角度精度: " />
|
|
|
- <Run Text="{Binding PrecisionResult.AnglePrecision, StringFormat={}{0:F2}°}"
|
|
|
- d:Text="0.12°"
|
|
|
- Foreground="#2C3E50"
|
|
|
- FontWeight="Bold" />
|
|
|
- </TextBlock>
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- <StackPanel Grid.Column="1">
|
|
|
- <TextBlock>
|
|
|
- <Run Text="3σ范围: " />
|
|
|
- <Run Text="{Binding PrecisionResult.OverallThreeSigmaRange, StringFormat={}±{0:F3}mm}"
|
|
|
- d:Text="±0.065mm"
|
|
|
- Foreground="#2C3E50"
|
|
|
- FontWeight="Bold" />
|
|
|
- </TextBlock>
|
|
|
- <TextBlock>
|
|
|
- <Run Text="CPK: " />
|
|
|
- <Run Text="{Binding PrecisionResult.OverallPrecision, StringFormat={}{0:F2}}"
|
|
|
- d:Text="1.85"
|
|
|
- Foreground="#2C3E50"
|
|
|
- FontWeight="Bold" />
|
|
|
- </TextBlock>
|
|
|
- <TextBlock>
|
|
|
- <Run Text="评级: " />
|
|
|
- <Run Text="{Binding ProcessRating}"
|
|
|
- d:Text="优秀"
|
|
|
- Foreground="#27AE60"
|
|
|
- FontWeight="Bold" />
|
|
|
- </TextBlock>
|
|
|
- </StackPanel>
|
|
|
- </Grid>
|
|
|
-
|
|
|
- <!-- 趋势图按钮 -->
|
|
|
- <Button Content="显示趋势图"
|
|
|
- Background="#E67E22"
|
|
|
- Foreground="White"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Margin="0 10 0 0"
|
|
|
- MinWidth="100"
|
|
|
- Command="{Binding ShowTrendChartCommand}" />
|
|
|
- </StackPanel>
|
|
|
- </Border>
|
|
|
- </StackPanel>
|
|
|
- </Border>
|
|
|
- </Grid>
|
|
|
- </Border>
|
|
|
+ </Border>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ </ScrollViewer>
|
|
|
|
|
|
<!-- 右侧图像和轨迹显示区域 -->
|
|
|
<Grid Grid.Column="1">
|