Beispiel #1
0
        private void buttonAddMarker_Click(object sender, RoutedEventArgs e)
        {
            AXWaypoint waypoint = null;

            if (listBoxMarkers.SelectedItem != null)
            {
                waypoint = (AXWaypoint)listBoxMarkers.SelectedItem;
            }
            else if (TrackPointer != null)
            {
                waypoint = new AXWaypoint("00", TrackPointer);
            }
            else
            {
                return;
            }

            var dlg = new InputWindow(s => AXWaypoint.Parse(s) != null)
            {
                Title = "Enter marker",
                Text  = waypoint.ToString(AXPointInfo.Name | AXPointInfo.Date | AXPointInfo.Time | AXPointInfo.Coords | AXPointInfo.Altitude)
            };

            dlg.ShowDialog();
            if (dlg.Response == System.Windows.Forms.DialogResult.OK)
            {
                Report.AddMarker(AXWaypoint.Parse(dlg.Text));
                Engine.Display();
            }
        }