/// ------------------------------------------------------------------------------------ public void AddIgnoredSegment(TimeSpan newBoundary) { Tiers.AddIgnoredSegment((float)newBoundary.TotalSeconds); _undoStack.Push(new SegmentChange(TimeTier.Segments.First(s => s.TimeRange.End == newBoundary).TimeRange.Copy(), c => { Tiers.GetTranscriptionTier().Segments.Last().Text = string.Empty; RevertNewSegment(c); })); OnSegmentBoundaryChanged(); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Return the transcription and/or translation roles if all the segments are not /// empty. /// </summary> /// ------------------------------------------------------------------------------------ public override IEnumerable <ComponentRole> GetAssignedRoles() { var transcriptionTier = Tiers.GetTranscriptionTier(); if (transcriptionTier != null && transcriptionTier.GetIsComplete()) { yield return(_componentRoles.Single(r => r.Id == ComponentRole.kTranscriptionComponentRoleId)); } // Stage status (complete-incomplete) is not displaying the status for Written Translations correctly, if one or more segments are ignored. var translationTier = Tiers.GetFreeTranslationTier(); if (translationTier != null && translationTier.GetIsComplete(transcriptionTier)) { yield return(_componentRoles.Single(r => r.Id == ComponentRole.kFreeTranslationComponentRoleId)); } if (Tiers.GetIsAdequatelyAnnotated(OralAnnotationType.CarefulSpeech)) { yield return(_componentRoles.Single(r => r.Id == ComponentRole.kCarefulSpeechComponentRoleId)); } if (Tiers.GetIsAdequatelyAnnotated(OralAnnotationType.Translation)) { yield return(_componentRoles.Single(r => r.Id == ComponentRole.kOralTranslationComponentRoleId)); } }
/// ------------------------------------------------------------------------------------ public bool GetIsSegmentIgnored(int segmentIndex) { if (Tiers.GetTranscriptionTier() == null || segmentIndex < 0 || segmentIndex >= Tiers.GetTranscriptionTier().Segments.Count) { return(false); } return(Tiers.GetIsSegmentIgnored(segmentIndex)); }