protected override string DoProcess(string[] request) { Track track = TrackParser.Parse(request); World.Robot.Movement.AddTrack(track); return("Track processed as " + track); }
private void Open_Result(object sender, RoutedEventArgs e) { OpenFileDialog resultFile = new OpenFileDialog { Filter = "HTML Files (*.html)|*.html" }; if (resultFile.ShowDialog() == true) { string session = "Race"; string[] filePath = resultFile.FileName.Split('\\'); ResultFileTextBox.Text = filePath[filePath.Length - 1]; track = TrackParser.Parse(resultFile.FileName); Console.WriteLine(track.length); ResultParser.Parse(ref drivers, resultFile.FileName, ref session, track.length); drivers.Sort(); track.laps = drivers[1].result.laps; PDFGeneration.RacePDFGenerator.OutputPDF(drivers, "Monster Energy NASCAR Cup Series", "Pennzoil 400", track); } }
public void ResultFileCommandAction() { if (selectedSeries != null) { Microsoft.Win32.OpenFileDialog resultFile = new Microsoft.Win32.OpenFileDialog { Filter = "HTML Files (*.html)|*.html", InitialDirectory = (System.IO.Directory.Exists((series.NR2K3Dir + "\\exports_imports"))) ? series.NR2K3Dir + "\\exports_imports" : "C:\\" }; if (resultFile.ShowDialog() == true) { track = TrackParser.Parse(series.NR2K3Dir, resultFile.FileName); resultFilePath = resultFile.FileName; ResultFile = resultFile.FileName.Split('\\').Last(); Sessions.Clear(); ResultParser.GetSessions(resultFile.FileName, Sessions); SelectedSession = (Sessions.Count > 0) ? Sessions[0] : null; } } }