public LoopEvent CreateLoop(int start, int count = 1) { var result = new LoopEvent(start, count); AddLoop(result); return(result); }
public static bool TryParse(string line, out LoopEvent l) { var parts = line.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); l = null; if (parts.Length < 3 || parts[0].Trim() != "L") { return(false); } int time, loop; if (!int.TryParse(parts[1], out time)) { return(false); } if (!int.TryParse(parts[2], out loop)) { return(false); } l = new LoopEvent(time, loop); return(true); }
public void AddLoop(LoopEvent l) { Loopevents.Add(l); Loopevents.Sort(); }