33 lines
624 B
C#
33 lines
624 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace AudioEditor;
|
|
|
|
public class Track
|
|
{
|
|
public int Idx { get; private set; }
|
|
public string Name { get; private set; }
|
|
|
|
public Track(int idx, string name)
|
|
{
|
|
Idx = idx;
|
|
Name = name;
|
|
}
|
|
|
|
public Track(int idx, string name, IEnumerable<Clip> clips)
|
|
{
|
|
Idx = idx;
|
|
Name = name;
|
|
_clips = clips.ToList();
|
|
}
|
|
|
|
public bool TryAddClip(Clip clip)
|
|
{
|
|
_clips.Add(clip);
|
|
return false;
|
|
}
|
|
|
|
public Track Duplicate() => new(Idx, Name, _clips);
|
|
|
|
private List<Clip> _clips = new();
|
|
} |