// Cinema Suite 2014
using System;
using System.Collections.Generic;
namespace CinemaDirector
{
///
/// The Attribute for tracks.
///
[AttributeUsage(AttributeTargets.Class)]
public class TimelineTrackAttribute : Attribute
{
// The user friendly name for this Track.
private string label;
// The genres of this track.
private List trackGenres = new List();
// The genres of items that this track can contain.
private List itemGenres = new List();
///
/// Attribute for Track Groups
///
/// The name of this track group.
/// The Genres of this track.
/// The Genres allowed to be contained in this track.
public TimelineTrackAttribute(string label, TimelineTrackGenre[] TrackGenres, params CutsceneItemGenre[] AllowedItemGenres)
{
this.label = label;
this.trackGenres.AddRange(TrackGenres);
this.itemGenres.AddRange(AllowedItemGenres);
}
///
/// Attribute for Track Groups.
///
/// The name of this track group.
/// The Genre of this track.
/// The Genres allowed to be contained in this track.
public TimelineTrackAttribute(string label, TimelineTrackGenre TrackGenre, params CutsceneItemGenre[] AllowedItemGenres)
{
this.label = label;
this.trackGenres.Add(TrackGenre);
this.itemGenres.AddRange(AllowedItemGenres);
}
///
/// The label of this track.
///
public string Label
{
get
{
return label;
}
}
///
/// The genres of this Track.
///
public TimelineTrackGenre[] TrackGenres
{
get
{
return trackGenres.ToArray();
}
}
///
/// The allowed item genres for this track.
///
public CutsceneItemGenre[] AllowedItemGenres
{
get
{
return itemGenres.ToArray();
}
}
}
}