/// ------------------------------------------------------------------------------------ private bool UpdateSegmentBoundary(AnnotationSegment seg, TimeSpan newEndTime) { var origTimeRange = seg.TimeRange.Copy(); if (TimeTier.ChangeSegmentsEndBoundary(seg.TimeRange.EndSeconds, (float)newEndTime.TotalSeconds) != BoundaryModificationResult.Success) { return(false); } _undoStack.Push(new SegmentChange(SegmentChangeType.EndBoundaryMoved, origTimeRange, seg.TimeRange.Copy(), c => SegmentBoundaryMoved(c.NewRange.End, c.OriginalRange.End))); return(true); }
public void ChangeSegmentsEndBoundary_FromBoundary_BoundaryNotFound_ReturnsNotSuccess() { Assert.AreEqual(BoundaryModificationResult.SegmentNotFound, _tier.ChangeSegmentsEndBoundary(12f, 25f)); }