public rFactor2Track(string trackfile, string root)
{
FoundFiles = false;
try
{
trackfile = trackfile.ToLower();
if (trackfile.EndsWith("gdb"))
{
masfile_gdb = rFactor2.Garage.Files.SearchFile(root, trackfile);
masfile_aiw = rFactor2.Garage.Files.SearchFile(root, trackfile.Replace("gdb", "aiw"));
}
else
{
masfile_aiw = rFactor2.Garage.Files.SearchFile(root, trackfile);
masfile_gdb = rFactor2.Garage.Files.SearchFile(root, trackfile.Replace("aiw", "gdb"));
}
FoundFiles = true;
}
catch (Exception ex)
{
Debug.WriteLine("Error when looking for data files for track " + trackfile);
}
}