public ChangeAction(ChangeType changeType, TranscriptionElement changedElement, TranscriptionIndex changeIndex, int changeAbsoluteIndex) { _changeType = changeType; _changedElement = changedElement; _changeTranscriptionIndex = changeIndex; _changeAbsoluteIndex = changeAbsoluteIndex; }
public void ValidateIndexOrThrow(TranscriptionIndex index) { if (!index.IsValid) { throw new ArgumentOutOfRangeException("index", "invalid index value"); } }
public override void RemoveAt(TranscriptionIndex index) { ValidateIndexOrThrow(index); if (!index.IsPhraseIndex) { throw new IndexOutOfRangeException("index"); } Phrases.RemoveAt(index.PhraseIndex); }
public override void Insert(TranscriptionIndex index, TranscriptionElement value) { ValidateIndexOrThrow(index); if (!index.IsPhraseIndex) { throw new IndexOutOfRangeException("index"); } Phrases.Insert(index.PhraseIndex, (TranscriptionPhrase)value); }
public override TranscriptionElement this[TranscriptionIndex index] { get { throw new NotImplementedException(); } set { throw new NotImplementedException(); } }
public override void RemoveAt(TranscriptionIndex index) { ValidateIndexOrThrow(index); if (index.IsParagraphIndex) { if (index.IsPhraseIndex) { Paragraphs[index.ParagraphIndex].RemoveAt(index); } else { Paragraphs.RemoveAt(index.ParagraphIndex); } } else { throw new IndexOutOfRangeException("index"); } }
public override void Insert(TranscriptionIndex index, TranscriptionElement value) { ValidateIndexOrThrow(index); if (index.IsParagraphIndex) { if (index.IsPhraseIndex) { Paragraphs[index.ParagraphIndex].Insert(index, value); } else { Paragraphs.Insert(index.ParagraphIndex, (TranscriptionParagraph)value); } } else { throw new IndexOutOfRangeException("index"); } }
public override TranscriptionElement this[TranscriptionIndex index] { get { ValidateIndexOrThrow(index); if (!index.IsPhraseIndex) { throw new IndexOutOfRangeException("index"); } return(Phrases[index.PhraseIndex]); } set { ValidateIndexOrThrow(index); if (!index.IsPhraseIndex) { throw new IndexOutOfRangeException("index"); } Phrases[index.PhraseIndex] = (TranscriptionPhrase)value; } }
public override TranscriptionElement this[TranscriptionIndex index] { get { ValidateIndexOrThrow(index); if (index.IsParagraphIndex) { if (index.IsPhraseIndex) { return(Paragraphs[index.ParagraphIndex][index]); } return(Paragraphs[index.ParagraphIndex]); } throw new IndexOutOfRangeException("index"); } set { ValidateIndexOrThrow(index); if (index.IsParagraphIndex) { if (index.IsPhraseIndex) { Paragraphs[index.ParagraphIndex][index] = value; } else { Paragraphs[index.ParagraphIndex] = (TranscriptionParagraph)value; } } else { throw new IndexOutOfRangeException("index"); } } }
public ParagraphLanguageAction(TranscriptionParagraph changedParagraph, TranscriptionIndex changeIndex, int changeAbsoluteIndex, string oldLanguage) : base(ChangeType.Modify, changedParagraph, changeIndex, changeAbsoluteIndex) { _oldLanguage = oldLanguage; }
public abstract void Insert(TranscriptionIndex index, TranscriptionElement value);
public abstract void RemoveAt(TranscriptionIndex index);
public abstract TranscriptionElement this[TranscriptionIndex index] { get; set; }
public ParagraphAttibutesAction(TranscriptionParagraph changedParagraph, TranscriptionIndex changeIndex, int changeAbsoluteIndex, ParagraphAttributes oldAttributes) : base(ChangeType.Modify, changedParagraph, changeIndex, changeAbsoluteIndex) { _oldAttributes = oldAttributes; }
public override void RemoveAt(TranscriptionIndex index) { throw new NotImplementedException(); }
public ReplaceAction(TranscriptionElement changedElement, TranscriptionIndex changeIndex, int changeAbsoluteIndex) : base(ChangeType.Replace, changedElement, changeIndex, changeAbsoluteIndex) { }
public InsertAction(TranscriptionElement changedElement, TranscriptionIndex changeIndex, int changeAbsoluteIndex) : base(ChangeType.Add, changedElement, changeIndex, changeAbsoluteIndex) { }
public EndAction(TranscriptionElement changedelement, TranscriptionIndex changeIndex, int changeAbsoluteIndex, TimeSpan oldtime) : base(ChangeType.Modify, changedelement, changeIndex, changeAbsoluteIndex) { _oldtime = oldtime; }
public PhrasePhoneticsAction(TranscriptionPhrase changedelement, TranscriptionIndex changeIndex, int changeAbsoluteIndex, string oldphonetics) : base(ChangeType.Modify, changedelement, changeIndex, changeAbsoluteIndex) { _oldtstring = oldphonetics; }
public TextAction(TranscriptionElement changedelement, TranscriptionIndex changeIndex, int changeAbsoluteIndex, string oldtstring) : base(ChangeType.Modify, changedelement, changeIndex, changeAbsoluteIndex) { _oldtstring = oldtstring; }
public override void Insert(TranscriptionIndex index, TranscriptionElement value) { throw new NotImplementedException(); }
public ParagraphSpeakerAction(TranscriptionParagraph changedParagraph, TranscriptionIndex changeIndex, int changeAbsoluteIndex, Speaker oldSpeaker) : base(ChangeType.Modify, changedParagraph, changeIndex, changeAbsoluteIndex) { _oldSpeaker = oldSpeaker; }