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); |