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

            TimelineUtils.ApplyTimeline(timeline);
        }