public void AddMovement(Movement movement) { if (TimelineUtils.HasIntersection(Movements, movement)) { throw new SfaException("Пересечение интервалов перемещения объекта: " + movement.ObjectId); } Movements.Add(movement); Movements.Sort((l, r) => l.Start.CompareTo(r.Start)); }
private static IEnumerable <Movement> ParseMovements(IEnumerable <XElement> movementNodes) { var list = new List <Movement>(); foreach (var movement in movementNodes.Select(ParseMovement)) { if (TimelineUtils.HasIntersection(list, movement)) { throw new SfaException("Пересечение интервалов перемещения объекта: " + movement.ObjectId); } list.Add(movement); } return(list); }
private void resetBtn_Click(object sender, EventArgs e) { TimelineUtils.ResetModel(); }
private void playBtn_Click(object sender, EventArgs e) { TimelineUtils.PlayAnimation(); }
private void compileBtn_Click(object sender, EventArgs e) { var timeline = TimelineParser.Parse(xmlTextBox.Text); TimelineUtils.ApplyTimeline(timeline); }