Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2341 → Rev 2342

/MKLiveView/v1.0/Source/MainWindow.xaml
664,7 → 664,7
</TabItem>
</TabControl>
</Grid>
<Grid x:Name="GridSettings" Background="#7B000000" HorizontalAlignment="Left" Width="233" Margin="23,36,0,0" Visibility="Collapsed">
<Grid x:Name="GridSettings" Background="#7B000000" HorizontalAlignment="Left" Width="233" Margin="23,36,0,0">
<TabControl x:Name="tabControlSettings" HorizontalAlignment="Left" Width="229" Background="{x:Null}" Margin="2,0,0,0">
<TabItem Header="General" Margin="0,0,-0.237,0">
<Grid x:Name="TabGridGeneral">
970,7 → 970,7
<Button x:Name="btnOSDEnter" Content="" HorizontalAlignment="Left" Height="34" Margin="87,90,0,0" VerticalAlignment="Top" Width="52" Click="btnOSDEnter_Click"/>
<Button x:Name="btnOSDLeave" Content="" HorizontalAlignment="Left" Height="34" Margin="144,90,0,0" VerticalAlignment="Top" Width="52" Click="btnOSDLeave_Click"/>
</Grid>
<Grid x:Name="GridWP" Margin="23,36,25,0" Background="#7F000000" Height="500" VerticalAlignment="Top">
<Grid x:Name="GridWP" Margin="23,36,25,0" Background="#7F000000" Height="500" VerticalAlignment="Top" Visibility="Collapsed">
<Label x:Name="label4" Content="points" HorizontalAlignment="Right" Margin="0,376,41,0" VerticalAlignment="Top" Width="53" Foreground="White" Height="26" HorizontalContentAlignment="Right"/>
<Label x:Name="lblWPCount" Content="##" HorizontalAlignment="Right" Margin="0,382,5,0" VerticalAlignment="Top" Width="38" Foreground="White" HorizontalContentAlignment="Right" Padding="0" Height="16"/>
<Label x:Name="label4_Copy" Content="WP Index" HorizontalAlignment="Left" Margin="94,194,0,0" VerticalAlignment="Top" Width="80" Foreground="White" Visibility="Hidden"/>
/MKLiveView/v1.0/Source/MainWindow.xaml.cs
45,6 → 45,7
PointLatLng end;
PointLatLng pHome;
GMapRoute mRouteWP;
GMapMarker wpActiveMarker;
List<PointLatLng> wpList = new List<PointLatLng>();
#region NC-Errors
String[] NC_Error = new string[44]
1694,15 → 1695,24
Dispatcher.Invoke((Action)(() => tbHP.Text = ((double)iVal / (double)10).ToString("0.0 m"))); //Distance to HP set by GPS on
 
Dispatcher.Invoke((Action)(() => tbWPIndex.Text = data[48].ToString())); //Waypoint index
if(_wpIndex != data[48] && wpList.Count > 0)
{
if (wpActiveMarker != null)
MainMap.Markers.Remove((GMapMarker)wpActiveMarker);
wpActiveMarker = new GMapMarker(wpList[data[48]]);
wpActiveMarker.Shape = new CustomMarkerWPActive(this, wpActiveMarker, "wpActive",0);
MainMap.Markers.Add(wpActiveMarker);
}
 
_wpIndex = data[48];
//if(wpList.Count > 0 && ((data[67] & 2) == 2))
//{
if(wpList.Count > 0 && ((data[67] & 2) == 2))
{
// Dispatcher.Invoke(() =>
// {
// if(data[48] < wpList.Count)
// {
// DataGridRow row;
// if (data[48] - 1 > -1)
// if (data[48] > 0)
// {
// row = (DataGridRow)dgvWP.ItemContainerGenerator.ContainerFromIndex(data[48] - 1);
// row.Background = new SolidColorBrush(Colors.Transparent);
1711,7 → 1721,7
// row.Background = new SolidColorBrush(Color.FromArgb(50, 0, 100, 255));
// }
// });
//}
}
Dispatcher.Invoke((Action)(() => tbWPCount.Text = data[49].ToString())); //Waypoints count
_wpCount = data[49];
Dispatcher.Invoke((Action)(() => tbTopSats.Text = data[50].ToString())); //Satellites
2786,6 → 2796,8
wpList.Clear();
if (mRouteWP != null)
MainMap.Markers.Remove(mRouteWP);
if (wpActiveMarker != null)
MainMap.Markers.Remove(wpActiveMarker);
Dispatcher.Invoke(() => lblWPRouteDistance.Content = "0 m");
 
for (int k = 1; k <= wpnum; k++)
3071,6 → 3083,8
wpList.Clear();
if (mRouteWP != null)
MainMap.Markers.Remove(mRouteWP);
if (wpActiveMarker != null)
MainMap.Markers.Remove(wpActiveMarker);
dtWaypoints.Rows.Clear();
Dispatcher.Invoke(() => dgvWP.Items.Refresh());
Dispatcher.Invoke(() => lblWPIndex.Content = 0);