Implement config var

Implement SongWriter and Song.Save()
This commit is contained in:
Flamefire committed 2013-10-12 17:32:24 +02:00
1 parent b0cb402dc3
commit cc6d921f03
7 files changed
+103 -17

No files matched your search

+9 -4
View File
@@ -20,7 +20,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using VocaluxeLib.Draw;
namespace VocaluxeLib.Songs
@@ -73,7 +72,7 @@ namespace VocaluxeLib.Songs
public SMedley Medley;
public bool CalculateMedley = true;
private bool _CalculateMedley = true;
public float PreviewStart;
public int ShortEnd;
@@ -197,7 +196,7 @@ namespace VocaluxeLib.Songs
FadeOutTime = song.Medley.FadeOutTime
};
CalculateMedley = song.CalculateMedley;
_CalculateMedley = song._CalculateMedley;
PreviewStart = song.PreviewStart;
ShortEnd = song.ShortEnd;
@@ -261,6 +260,12 @@ namespace VocaluxeLib.Songs
return loader.ReadNotes();
}
public bool Save(string filePath)
{
var writer = new CSongWriter(this);
return writer.SaveFile(filePath);
}
public string GetMP3()
{
return Path.Combine(Folder, MP3FileName);
@@ -381,7 +386,7 @@ namespace VocaluxeLib.Songs
if (Medley.Source == EMedleySource.Tag)
return;
if (!CalculateMedley)
if (!_CalculateMedley)
return;
List<SSeries> series = _GetSeries();