private void testToolStripMenuItem_Click(object sender, EventArgs e) { Track tr = new Track(); // tr.TestLength(); }
private void openMenuItem_Click(object sender, EventArgs e) { this.aFileDialogue.DefaultExt = "gpx"; this.aFileDialogue.Filter = "gpx files (*.gpx)|*.gpx"; this.aFileDialogue.FileName = "tracks"; if (this.aFileDialogue.ShowDialog() == DialogResult.OK) { string filename = this.aFileDialogue.FileName; clearTracks(); clearPoints(); CurrentTrack = new Track(); CurrentTrack.LoadTrack(filename); CurrentTrack.DisplayTrack(this); // tr.PrintTrack(); // tr.TrackLength(); // string path = Path.GetDirectoryName(filename); // LoadXMLFiles(path, true); } }
private void saveToolStripMenuItem_Click(object sender, EventArgs e) { if (lblTracks.SelectedItem != null) { string trackName = lblTracks.SelectedItem.ToString(); saveTrackRoute(trackName, "track"); } else { if (CurrentTrack == null) { decimal[] pts = getCoordsfromDataEntry(); string[] labels = getLabelsfromDataEntry(); CurrentTrack = new Track(pts, labels); // CurrentTrack. } saveTrackRoute("generated_route", "route"); } }
private void NewtoolStripMenuItem_Click(object sender, EventArgs e) { if (CurrentTrack != null && !CurrentTrack.isEmpty()) { DialogResult dlgres = MessageBox.Show( "The current track is not empty.\n\n" + "select OK if you to create a new track, or Cancel to keep it", "Current Track Active", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); if (dlgres != DialogResult.OK) return; } clearTracks(); clearPoints(); CurrentTrack = new Track(); DGVDataEntry.Rows.Clear(); //CurrentTrack. }