Пример #1
0
        private void loadNumpyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewProject newProject = new NewProject();

            newProject.CsvMode = false;
            if (newProject.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            TrackData trackData = new NpyTrackData(newProject.Filename);

            LoadProject(trackData, newProject.IterationCount, newProject.InnerBand, newProject.MinSpeed, newProject.Forecast);
        }
Пример #2
0
        private void loadPointsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewProject newProject = new NewProject();

            newProject.CsvMode = true;
            if (newProject.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            TrackData trackData = new WayPointsTrackData(newProject.TrackWidth,
                                                         File.ReadAllLines(newProject.Filename)
                                                         .Select(x => x.Split('\t', ' ', ',', ';').Select(y => double.Parse(y.Replace('.', ','))).ToArray())
                                                         .ToArray());

            LoadProject(trackData, newProject.IterationCount, newProject.InnerBand, newProject.MinSpeed, newProject.Forecast);
        }