public static string makeUniqueTrackName(string name, ref List<Track> trackList, bool renaming)
{
int uniqueIndex = 1;
string uniqueSuffix = "";
//while (File.Exists(Utilities.TrackPath + name + "_" + uniqueIndex + ".trk"))
//{
// ++uniqueIndex;
//}
while (!nameIsUnique(name + uniqueSuffix, ref trackList, renaming))
{
uniqueIndex++;
uniqueSuffix = "_" + uniqueIndex;
}
return name + uniqueSuffix;
}