Beispiel #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)
 {
     TrItem[] items;
     if (_TDB == null)
     {
         //It is not clear that 10000 items is enough, which would give wrong warnings
         Console.WriteLine("");
         Console.Write("  Not using the proper .tdb, but just an empty array of TrItems for loading the .ws file: ");
         items = new TrItem[100000];
     }
     else
     {
         items = _TDB.TrItemTable;
     }
     var wf = new WorldSoundFile(file, items);
 }
        /// <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)
        {
            TrackItem[] items;
            if (trackDB == null)
            {
                //It is not clear that 10000 items is enough, which would give wrong warnings
                Console.WriteLine("");
#pragma warning disable CA1303 // Do not pass literals as localized parameters
                Console.Write("  Not using the proper .tdb, but just an empty array of TrItems for loading the .ws file: ");
#pragma warning restore CA1303 // Do not pass literals as localized parameters
                items = new TrackItem[100000];
            }
            else
            {
                items = trackDB.TrackItems;
            }

            _ = new WorldSoundFile(file, items);
        }