Ejemplo n.º 1
0
        public bool loadDTA()
        {
            try
            {
                Song.Name          = Parser.Songs[0].Name;
                Song.Artist        = Parser.Songs[0].Artist;
                Song.Album         = Parser.Songs[0].Album;
                Song.Year          = Parser.Songs[0].YearReleased;
                Song.HopoThreshold = Parser.Songs[0].HopoThreshold;
                Song.DrumKit       = Parser.GetDrumKit(Parser.Songs[0].DrumBank);
                Song.TrackNumber   = Parser.Songs[0].TrackNumber;
                switch (Parser.Songs[0].VocalParts)
                {
                case 0:
                {
                    Song.DiffVocals   = -1;
                    Song.HasHarmonies = false;
                }
                break;

                case 1:
                {
                    Song.HasHarmonies = false;
                }
                break;

                case 2:
                {
                    Song.HasHarmonies = true;
                }
                break;

                case 3:
                {
                    Song.HasHarmonies = true;
                }
                break;

                default:
                {
                    Song.DiffVocals   = -1;
                    Song.HasHarmonies = false;
                }
                break;
                }
                Song.DiffDrums     = Parser.Songs[0].DrumsDiff - 1;
                Song.DiffBand      = Parser.Songs[0].BandDiff - 1;
                Song.DiffBass      = Parser.Songs[0].BassDiff - 1;
                Song.DiffGuitar    = Parser.Songs[0].GuitarDiff - 1;
                Song.DiffKeys      = Parser.Songs[0].KeysDiff - 1;
                Song.DiffProKeys   = Parser.Songs[0].DisableProKeys ? -1 : Parser.Songs[0].ProKeysDiff - 1;
                Song.DiffProBass   = Parser.Songs[0].ProBassDiff - 1;
                Song.DiffProGuitar = Parser.Songs[0].ProGuitarDiff - 1;
                Song.DiffVocals    = Parser.Songs[0].VocalsDiff - 1;
                Song.PreviewStart  = Parser.Songs[0].PreviewStart;
                Song.Length        = Parser.Songs[0].Length;
                Song.Genre         = Parser.Songs[0].Genre;
                Song.SubGenre      = Parser.Songs[0].SubGenre;
                Song.BassTuning    = Parser.Songs[0].ProBassTuning;
                Song.GuitarTuning  = Parser.Songs[0].ProGuitarTuning;
                Song.Charter       = Parser.Songs[0].ChartAuthor;
                Song.RhythmOnBass  = Parser.Songs[0].RhythmBass;
                Song.RhythmOnKeys  = Parser.Songs[0].RhythmKeys;
                return(true);
            }
            catch (Exception ex)
            {
                Log("There was an error processing that songs.dta file");
                Log("The error says: " + ex.Message);
                return(false);
            }
        }