Exemple #1
0
        /// <summary>
        /// Try to load the file.
        /// Possibly this might raise an exception. That exception is not caught here
        /// </summary>
        /// <param name="file">The file that needs to be loaded</param>
        public override void TryLoading(string file)
        {
            string subdirname = Path.GetFileName(Path.GetDirectoryName(file));

            if (subdirname.Equals("openrails", System.StringComparison.OrdinalIgnoreCase))
            {
                string RoutePath = Path.GetDirectoryName(Path.GetDirectoryName(file));
                _ = new ORCarSpawnerFile(file, RoutePath + @"\shapes\");
            }
            else
            {
                string RoutePath = Path.GetDirectoryName(file);
                _ = new CarSpawnerFile(file, RoutePath + @"\shapes\");
            }
        }
        /// <summary>
        /// Try to load the file.
        /// Possibly this might raise an exception. That exception is not caught here
        /// </summary>
        /// <param name="file">The file that needs to be loaded</param>
        public override void TryLoading(string file)
        {
            var subdirname = Path.GetFileName(Path.GetDirectoryName(file)).ToLowerInvariant();

            if (subdirname == "openrails")
            {
                string RoutePath         = Path.GetDirectoryName(Path.GetDirectoryName(file));
                var    extCarSpawnerFile = new ORCarSpawnerFile(file, RoutePath + @"\shapes\");
            }
            else
            {
                string RoutePath      = Path.GetDirectoryName(file);
                var    carSpawnerFile = new CarSpawnerFile(file, RoutePath + @"\shapes\");
            }
        }