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));
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 private void resetBtn_Click(object sender, EventArgs e)
 {
     TimelineUtils.ResetModel();
 }
Beispiel #4
0
 private void playBtn_Click(object sender, EventArgs e)
 {
     TimelineUtils.PlayAnimation();
 }
Beispiel #5
0
        private void compileBtn_Click(object sender, EventArgs e)
        {
            var timeline = TimelineParser.Parse(xmlTextBox.Text);

            TimelineUtils.ApplyTimeline(timeline);
        }