static CategoryField() { _title = new CategoryField("Title", typeof(string)); _artist = new CategoryField("Artist", typeof(string)); _album = new CategoryField("Album", typeof(string)); _release = new CategoryField("Year", "Year", typeof(int)); _size = new CategoryField("Size", "File Size", typeof(int), DisplayTypes.DataSize,0); _length = new CategoryField("Length", typeof(TimeSpan)); _path = new CategoryField("Path", typeof(string)); _genre = new CategoryField("Genre", typeof(string)); _rating = new CategoryField("Rating", typeof(byte), DisplayTypes.Rating); _uid = new CategoryField("UID", typeof(ulong), DisplayTypes.Hide); _thumb = new CategoryField("Thumb", typeof(ulong), DisplayTypes.Hide); Composer = new CategoryField("Composer", typeof(string)); DateAdded = new CategoryField("DateAdded", "Date Added", typeof(DateTime)); DateModified = new CategoryField("DateMod", "Date Modified", typeof(DateTime)); BitRate = new CategoryField("BitRate", "Bit Rate", typeof(int), DisplayTypes.BitRate,0); SampleRate = new CategoryField("SampleRate", "Sample Rate", typeof(int), DisplayTypes.SampleRate,0); TrackNumber = new CategoryField("TrackNumber", "Track #", typeof(int)); DiscNumber = new CategoryField("DiscNumber", "Disc #", typeof(int)); BPM = new CategoryField("BPM", typeof(int)); Comment = new CategoryField("Comment", "Comment", typeof(string)); CopyRight = new CategoryField("CopyRight", "Copyright", typeof(string)); Lyrics = new CategoryField("Lyrics", "Lyrics", typeof(string)); Channels = new CategoryField("Channels", "Audio Channels", typeof(int)); //Hash = new CategoryField("Hash", "Hash", typeof(ulong), DisplayTypes.Hide,0); }
public Category(string name,CategoryField[] fields, byte id) { _name = name; _fields = fields; _id = id; }
public override object GetFieldValue(CategoryField field) { if (!_tags.ContainsKey(field)) return null; return _tags[field]; }
public abstract object GetFieldValue(CategoryField field);
/// <summary> /// Construct for CategoryField based on anthor CategoryField. /// </summary> /// <param name="b">The base CategoryField</param> /// <param name="displayName">The displayName</param> public CategoryField(CategoryField b, String displayName) : this(b.Name,displayName,b.DataType,b.DisplayType,b.DefaultValue) { }