public void UpdateInformation(TimelineElement e, double offsetUpdate, double updatedStartPosition, ElementPositionType positionType) { this.element = e; this.offset += offsetUpdate; this.startPosition = updatedStartPosition; this.type = positionType; }
/// <summary> /// Initializes a new instance of the <see cref="ElementMovedPayload"/> class. /// </summary> /// <param name="element">The <see cref="TimelineElement"/>.</param> /// <param name="positionType">Type of the position.</param> /// <param name="oldPosition">The old position.</param> /// <param name="newPosition">The new position.</param> public ElementMovedPayload(TimelineElement element, ElementPositionType positionType, TimeCode oldPosition, TimeCode newPosition) { this.Element = element; this.PositionType = positionType; this.OldPosition = oldPosition; this.NewPosition = newPosition; }
/// <summary> /// Moves the comments associated to given <see cref="TimelineElement"/>. /// </summary> /// <param name="element">The <see cref="SequenceModel"/>.</param> /// <param name="positionType">Type of the position.</param> /// <param name="oldPosition">The old position.</param> /// <param name="newPosition">The new position.</param> private void MoveCommentsAssociatedToElement(TimelineElement element, ElementPositionType positionType, TimeCode oldPosition, TimeCode newPosition) { if (element.Asset != null && element.Asset is VideoAsset) { foreach (Comment comment in element.Comments) { if (newPosition > oldPosition) { if (positionType != ElementPositionType.OutPosition) { comment.MarkIn += newPosition.TotalSeconds - oldPosition.TotalSeconds; } if (positionType != ElementPositionType.InPosition) { comment.MarkOut += newPosition.TotalSeconds - oldPosition.TotalSeconds; } } else if (newPosition < oldPosition) { if (positionType != ElementPositionType.OutPosition) { comment.MarkIn -= oldPosition.TotalSeconds - newPosition.TotalSeconds; } if (positionType != ElementPositionType.InPosition) { comment.MarkOut -= oldPosition.TotalSeconds - newPosition.TotalSeconds; } } this.eventAggregator.GetEvent <CommentUpdatedEvent>().Publish(comment); } } }