using System;
using System.Collections.Generic;
using JD.Collections.Extensions;
using JD.Serialization;
namespace JDSongConverter
{
///
/// A Just Dance version
///
public enum JDSongVersion
{
Unknown,
JD1,
JD2,
JD3,
JD4,
JD5,
JD2015,
JD2016
}
///
/// A folder layout
///
public enum JDFolderLayout
{
CatalogProd,
Engine,
Unknown
}
public static class JDSongTypeExtensions
{
public static string WithoutJdPrefix(this JDSongVersion version)
{
return version.ToString().Replace("JD", "");
}
public static int WithoutJdPrefixNumeric(this JDSongVersion version)
{
return int.Parse(version.ToString().Replace("JD", ""));
}
}
///
/// A class reprensenting a Just Dance song from any version
///
public class JDSong
{
///
/// The root absolute path of the song
///
public string RootPath { get; set; }
///
/// The name of the song
///
public string Name { get; set; }
///
/// The version of the song
///
public JDSongVersion Version { get; set; }
///
/// The number of players
///
public int PlayerCount { get; set; }
///
/// The folder layout of the song (engine, catalog...)
///
public JDFolderLayout FolderLayout { get; set; }
public override string ToString()
{
return String.Format("{0} [{1}]", Name, Version);
}
}
///
/// A collection of songs
///
public class JDSongCollection : UAFList
{
public JDSongCollection(){}
public JDSongCollection(IEnumerable songs)
{
this.AddRange(songs);
}
}
}