| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817 |
- <UserControl x:Class="TeamAAS_VP.Views.Product.VisionDynamicAccuracyAnalyzer"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:wf="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
- xmlns:vp="clr-namespace:Cognex.VisionPro;assembly=Cognex.VisionPro.Controls"
- 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: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:mah="http://metro.mahapps.com/winfx/xaml/controls"
- 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:VisionDynamicAccuracyAnalyzerViewModel}"
- d:Height="1080"
- d:Width="1920"
- MinHeight="500"
- MinWidth="500"
- d:Background="White"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- FontFamily="{DynamicResource DefaultFont}">
- <prism:Dialog.WindowStyle>
- <Style TargetType="Window">
- <Setter Property="prism:Dialog.WindowStartupLocation"
- Value="CenterScreen" />
- <Setter Property="AllowDrop"
- 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"
- Value="True" />
- </Style>
- </prism:Dialog.WindowStyle>
- <UserControl.Resources>
- <!-- 复用静态测试的样式 -->
- <Style TargetType="Button"
- BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}">
- <Setter Property="Padding"
- Value="10 5" />
- <Setter Property="Margin"
- Value="5" />
- <Setter Property="FontSize"
- Value="14" />
- <Setter Property="BorderThickness"
- Value="0" />
- </Style>
- <Style TargetType="TextBlock">
- <Setter Property="VerticalAlignment"
- Value="Center" />
- <Setter Property="Margin"
- Value="5" />
- </Style>
- <Style TargetType="TextBox"
- BasedOn="{StaticResource MaterialDesignTextBox}">
- <Setter Property="Margin"
- Value="5" />
- <Setter Property="VerticalContentAlignment"
- Value="Center" />
- </Style>
- <Style x:Key="DataGridStyle"
- TargetType="DataGrid"
- BasedOn="{StaticResource MaterialDesignDataGrid}">
- <Setter Property="Margin"
- Value="5" />
- <Setter Property="AutoGenerateColumns"
- Value="False" />
- <Setter Property="CanUserAddRows"
- Value="False" />
- <Setter Property="CanUserDeleteRows"
- Value="False" />
- <Setter Property="IsReadOnly"
- Value="True" />
- <Setter Property="AlternatingRowBackground"
- Value="#F5F5F5" />
- </Style>
- <Style x:Key="TitleStyle"
- TargetType="TextBlock">
- <Setter Property="FontSize"
- Value="16" />
- <Setter Property="FontWeight"
- Value="Bold" />
- <Setter Property="Margin"
- Value="0 10 0 5" />
- <Setter Property="Foreground"
- Value="#2C3E50" />
- </Style>
- </UserControl.Resources>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="45*" />
- <ColumnDefinition Width="55*" />
- </Grid.ColumnDefinitions>
- <!-- 左侧控制面板 -->
- <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>
- <!-- 机器人位置设置 -->
- <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"
- 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>
- <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 Margin="0 10 0 0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <!-- 重复次数 -->
- <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>
- </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">
- <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>
- <!-- 测试结果列表 -->
- <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>
- </ScrollViewer>
- <!-- 右侧图像和轨迹显示区域 -->
- <Grid Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <!-- 图像显示区域 -->
- <Border Background="#2C3E50">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <!-- VisionPro图像显示 -->
- <wf:WindowsFormsHost Grid.Row="0">
- <vp:CogRecordDisplay x:Name="display"
- Dock="Fill" />
- </wf:WindowsFormsHost>
- <!-- 图像信息栏 -->
- <!--<Border Grid.Row="1"
- Background="#34495E"
- Padding="10">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <StackPanel Grid.Column="0"
- Orientation="Horizontal">
- <TextBlock Text="图像信息: "
- Foreground="White" />
- <TextBlock Text="{Binding ImageInfo}"
- d:Text="第15次采集 - 检测成功"
- Foreground="#F1C40F"
- FontWeight="Bold" />
- </StackPanel>
- <StackPanel Grid.Column="1"
- Orientation="Horizontal">
- <TextBlock Text="检测时间: "
- Foreground="White" />
- <TextBlock Text="{Binding DetectTime, StringFormat={}{0:F3}s}"
- d:Text="0.123s"
- Foreground="#F1C40F"
- FontWeight="Bold"
- Width="60" />
- </StackPanel>
- </Grid>
- </Border>-->
- </Grid>
- </Border>
- <!-- 轨迹可视化区域 -->
- <!--<Border Grid.Row="1"
- Background="#ECF0F1"
- Padding="10"
- BorderBrush="#BDC3C7"
- BorderThickness="0 1 0 0">
- <StackPanel>
- <TextBlock Text="机器人轨迹可视化"
- FontWeight="Bold"
- Margin="0 0 0 5" />
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- -->
- <!-- 简化轨迹图 -->
- <!--
- <Canvas x:Name="trajectoryCanvas"
- Height="100"
- Background="White"
- Margin="0 5 0 0">
- -->
- <!-- A点标记 -->
- <!--
- <Ellipse Canvas.Left="50"
- Canvas.Top="50"
- Width="12"
- Height="12"
- Fill="#3498DB"
- Stroke="#2C3E50"
- StrokeThickness="1">
- <Ellipse.ToolTip>
- <ToolTip>
- <StackPanel>
- <TextBlock Text="A点 - 起始位置"
- FontWeight="Bold" />
- <TextBlock Text="{Binding PointA}" />
- </StackPanel>
- </ToolTip>
- </Ellipse.ToolTip>
- </Ellipse>
- <TextBlock Canvas.Left="45"
- Canvas.Top="65"
- Text="A"
- FontWeight="Bold"
- Foreground="#2C3E50" />
- -->
- <!-- B点标记 -->
- <!--
- <Ellipse Canvas.Left="200"
- Canvas.Top="50"
- Width="12"
- Height="12"
- Fill="#E74C3C"
- Stroke="#2C3E50"
- StrokeThickness="1">
- <Ellipse.ToolTip>
- <ToolTip>
- <StackPanel>
- <TextBlock Text="B点 - 拍照位置"
- FontWeight="Bold" />
- <TextBlock Text="{Binding PointB}" />
- </StackPanel>
- </ToolTip>
- </Ellipse.ToolTip>
- </Ellipse>
- <TextBlock Canvas.Left="195"
- Canvas.Top="65"
- Text="B"
- FontWeight="Bold"
- Foreground="#2C3E50" />
- -->
- <!-- 移动轨迹线 -->
- <!--
- <Line x:Name="trajectoryLine"
- X1="56"
- Y1="56"
- X2="194"
- Y2="56"
- Stroke="#7F8C8D"
- StrokeThickness="2"
- StrokeDashArray="5,3" />
- -->
- <!-- 当前位置标记 -->
- <!--
- <Ellipse x:Name="currentPositionMarker"
- Canvas.Left="125"
- Canvas.Top="50"
- Width="8"
- Height="8"
- Fill="#27AE60"
- Stroke="White"
- StrokeThickness="1"
- Visibility="Visible">
- <Ellipse.ToolTip>
- <ToolTip>
- <StackPanel>
- <TextBlock Text="当前位置"
- FontWeight="Bold" />
- <TextBlock Text="{Binding CurrentPosition}" />
- </StackPanel>
- </ToolTip>
- </Ellipse.ToolTip>
- </Ellipse>
- </Canvas>
- -->
- <!-- 轨迹控制 -->
- <!--
- <StackPanel Grid.Column="1"
- Orientation="Vertical"
- Margin="10 0 0 0">
- <CheckBox Content="显示轨迹"
- IsChecked="{Binding ShowTrajectory, Mode=TwoWay}"
- Margin="0 0 0 5" />
- <CheckBox Content="实时更新"
- IsChecked="{Binding RealTimeUpdate, Mode=TwoWay}"
- Margin="0 0 0 5" />
- <Button Content="重置视图"
- MinWidth="80"
- Height="25"
- Command="{Binding ResetTrajectoryViewCommand}" />
- </StackPanel>
- </Grid>
- </StackPanel>
- </Border>-->
- <!-- 底部按钮 -->
- <StackPanel Grid.Row="2"
- Orientation="Horizontal"
- VerticalAlignment="Center"
- HorizontalAlignment="Right"
- Margin="0 5 5 5">
- <Button Height="30"
- MinWidth="100"
- Content="{lex:Loc 确定}"
- materialDesign:ButtonAssist.CornerRadius="10"
- ToolTip="{lex:Loc 确定}"
- Command="{Binding ConfirmCommand}" />
- <Button Height="30"
- Margin="10,0"
- MinWidth="100"
- materialDesign:ButtonAssist.CornerRadius="10"
- ToolTip="{lex:Loc 取消}"
- Content="{lex:Loc 取消}"
- Command="{Binding CancelCommand}" />
- </StackPanel>
- </Grid>
- <!-- 消息提示 -->
- <materialDesign:Snackbar Grid.ColumnSpan="2"
- Opacity="0.8"
- HorizontalContentAlignment="Center"
- FontSize="14"
- MessageQueue="{Binding MessageQueue}"
- VerticalAlignment="Bottom" />
- </Grid>
- </UserControl>
|