Plane.FormationCreator/Plane.FormationCreator/Views/RtcmInfoView.xaml
xu 84c12a1eb7 写入航点时停止发送RTK
调整按钮位置,分开选中和整体的操作
修改电压后面信息无法显示的bug
加入显示所有航点功能
2020-03-27 17:05:48 +08:00

120 lines
6.8 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<c:MetroWindow x:Class="Plane.FormationCreator.Views.RtcmInfoView"
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:Plane.FormationCreator.Views"
xmlns:c="http://metro.mahapps.com/winfx/xaml/controls"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="800"
Height="350" Width="1500" WindowStartupLocation="CenterScreen" Background="#FF2D2D2D" BorderBrush="#FF039AF0" Title="RTK控制" ResizeMode="NoResize" Topmost="True">
<Grid Margin="0,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Margin="5" Orientation="Horizontal" VerticalAlignment="Center">
<ComboBox Width="120" Height="25" Foreground="White" SelectedIndex="0"
Margin="10" ItemsSource="{Binding serialPorts, Mode=OneWay}"
SelectedValue="{Binding SerialPortsSelectdValue}"
DropDownOpened="ComboBox_DropDownOpened"/>
<Button Margin="6" Width="80" Height="28"
Content="{Binding RtcmManager.Rtcmthreadrun,Converter={StaticResource SendConverter}}"
Command="{Binding ConnectRtcmCommand}"/>
<Label Margin="6,6,0,6" Height="28" Content="总数:"/>
<Label Margin="0,6,6,6" Height="28" Content="{Binding RtcmManager.rtcmInfoList.Count,UpdateSourceTrigger=PropertyChanged}"></Label>
<Border Margin="10,5" BorderBrush="#FFB9B8B8" BorderThickness="1">
<StackPanel Margin="5" Orientation="Vertical">
<StackPanel Margin="5" Orientation="Horizontal">
<TextBlock Text="接收速率: "/>
<TextBlock TextAlignment="Right" Width="30"
Text="{Binding RtcmManager.Bps}"/>
<TextBlock Text=" bps发送速率"/>
<TextBlock TextAlignment="Right" Width="30"
Text="{Binding RtcmManager.Bpsusefull}"/>
<TextBlock Text=" bps"/>
</StackPanel>
<StackPanel Margin="5" Orientation="Horizontal">
<TextBlock Text="消息: "/>
<TextBlock Text="{Binding RtcmManager.Messages_seen}"
/>
</StackPanel>
</StackPanel>
</Border>
<Border Margin="10,5" BorderBrush="#FFB9B8B8" BorderThickness="1">
<StackPanel Margin="5" Width="488">
<StackPanel Orientation="Horizontal">
<TextBlock Margin="5" Text="基站位置"/>
<Rectangle Margin="0,0,15,0" Width="20" Height="20"
Fill="{Binding RtcmManager.BaseState,Converter={StaticResource ColorConverter}}"/>
<TextBlock Margin="5" Text="Gps"/>
<Rectangle Margin="0,0,15,0" Width="20" Height="20"
Fill="{Binding RtcmManager.GlonassState,Converter={StaticResource ColorConverter}}"/>
<TextBlock Margin="5" Text="Glonass"/>
<Rectangle Margin="0,0,15,0" Width="20" Height="20"
Fill="{Binding RtcmManager.GpsState,Converter={StaticResource ColorConverter}}"/>
<TextBlock Margin="5" Text="北斗"/>
<Rectangle Margin="0,0,15,0" Width="20" Height="20"
Fill="{Binding RtcmManager.BeidouState,Converter={StaticResource ColorConverter}}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" >
<TextBlock Margin="5" Text="RTCM 位置"/>
<TextBlock Margin="2,5" Text="{Binding RtcmManager.StationLat}"/>
<TextBlock Margin="2,5" Text="{Binding RtcmManager.StationLng}"/>
<TextBlock Margin="2,5" Text="{Binding RtcmManager.StationAlt}"/>
<TextBlock Margin="2,5" Text="-"/>
<TextBlock Margin="2,5" Text="{Binding RtcmManager.StationTime}"/>
</StackPanel>
</StackPanel>
</Border>
</StackPanel>
<ItemsControl Grid.Row="1"
ItemsSource="{Binding Path = RtcmManager.rtcmInfoList}"
>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1"></UniformGrid>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="15*" />
<RowDefinition Height="15*" />
</Grid.RowDefinitions>
<ProgressBar Margin="0.5"
Orientation="Vertical"
Minimum="25"
Maximum="55"
Grid.RowSpan="2"
Value="{Binding Snr, UpdateSourceTrigger=PropertyChanged}"/>
<StackPanel Orientation ="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
<StackPanel Orientation ="Horizontal">
<TextBlock Text="{Binding Sys,UpdateSourceTrigger=PropertyChanged}" Foreground="Black"></TextBlock>
<TextBlock Text="{Binding Prn,UpdateSourceTrigger=PropertyChanged}" Foreground="Black"></TextBlock>
</StackPanel>
<TextBlock Margin="0,20,0,0" Text="{Binding Snr,UpdateSourceTrigger=PropertyChanged}" Foreground="Black"></TextBlock>
</StackPanel>
<StackPanel Grid.Row="1" Orientation ="Vertical" HorizontalAlignment="Center">
<Line Stroke="Red" X2="1000" StrokeThickness="3" />
<TextBlock Text="40" Foreground="Black"/>
</StackPanel>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</c:MetroWindow>