639,7 → 639,13 |
{ |
MainMap.Manager.Mode = AccessMode.ServerAndCache; |
copter = new GMapMarker(MainMap.Position); |
copter.Shape = new CustomMarkerCopter(this, copter, MainMap.Position.Lat.ToString("0.#######°") + System.Environment.NewLine + MainMap.Position.Lng.ToString("0.#######°")); |
|
copter.Shape = new CustomMarkerCopter(this, copter, MainMap.Position.Lat.ToString("0.#######°") + System.Environment.NewLine + MainMap.Position.Lng.ToString("0.#######°"),"red"); |
if (comboBoxCopterColor.SelectionBoxItem != null) |
{ |
string s = comboBoxCopterColor.SelectionBoxItem.ToString(); |
((CustomMarkerCopter)(copter.Shape)).setColor(s); |
} |
copter.Offset = new System.Windows.Point(-18, -18); |
copter.ZIndex = int.MaxValue; |
MainMap.Markers.Add(copter); |
1771,19 → 1777,26 |
if (data[1] == 1) |
{ |
dtWaypoints.Rows.Clear(); |
foreach (GMapMarker p in MainMap.Markers) |
{ |
if (p.Shape.GetType() == typeof(CustomMarkerWP)) |
MainMap.Markers.Remove(p); |
} |
Dispatcher.Invoke(() => { |
for (int k = 0; k < MainMap.Markers.Count;) |
{ |
GMapMarker p = MainMap.Markers[k]; |
if (p.Shape.GetType() == typeof(CustomMarkerWP)) |
MainMap.Markers.Remove(p); |
else |
k++; |
} |
}); |
} |
DataRow dr = dtWaypoints.NewRow(); |
dr = Waypoints.toDataRow(data, dr); |
dtWaypoints.Rows.Add(dr); |
GMapMarker wp = new GMapMarker(new PointLatLng((double)dr[3], (double)dr[4])); |
wp.Shape = new CustomMarkerWP(this, wp, (string)dr[2],(int)dr[1]); |
_setMarkerColor(wp, (int)dr[1]); |
MainMap.Markers.Add(wp); |
Dispatcher.Invoke(() => { |
GMapMarker wp = new GMapMarker(new PointLatLng((double)dr[3], (double)dr[4])); |
wp.Shape = new CustomMarkerWP(this, wp, (string)dr[2],(int)dr[1]); |
_setMarkerColor(wp, (int)dr[1]); |
MainMap.Markers.Add(wp); |
}); |
Dispatcher.Invoke(() => dgvWP.Items.Refresh()); |
Dispatcher.Invoke(() => _iWPIndex = data[1]); |
if (data[1] == data[0]) |
2795,6 → 2808,20 |
} |
}); |
} |
|
private void comboBoxCopterColor_DropDownClosed(object sender, EventArgs e) |
{ |
Dispatcher.Invoke(() => { |
if (comboBoxCopterColor.SelectionBoxItem != null) |
{ |
string s = comboBoxCopterColor.SelectionBoxItem.ToString(); |
((CustomMarkerCopter)(copter.Shape)).setColor(s); |
} |
else |
((CustomMarkerCopter)(copter.Shape)).setColor("red"); |
}); |
} |
|
private void btnLoadWPLFile_Click(object sender, RoutedEventArgs e) |
{ |
_readWPLFile(); |