SimTelemetry.Game.rFactor2.Garage.rFactor2Track.rFactor2Track C# (CSharp) Method

rFactor2Track() public method

public rFactor2Track ( string trackfile, string root ) : System
trackfile string
root string
return System
        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);
            }
        }