C# 클래스 SubLib.Core.Domain.SubtitleCollection

A container that represents all the subtitles.
파일 보기 프로젝트 열기: GNOME/gnome-subtitles 1 사용 예제들

공개 메소드들

메소드 설명
Add ( Subtitle subtitle ) : void

Adds a subtitle to the end of the collection.

Add ( Subtitle subtitle, int index ) : void

Adds a subtitle to the collection, inserting it at the specified index.

AddNewAfter ( int index, SubtitleProperties subtitleProperties ) : bool

Creates a subtitle based on the subtitle at the specified index and adds it to the collection, inserting it right after that index.

The newly created subtitle's times will be based on the specified subtitle. Its start time will be the end time of the existing subtitle plus SubtitleConstants.MinTimeBetweenSubtitles. Its duration will be SubtitleConstants.MaxSingleLineSubtitleDuration.

AddNewAfter ( int index, SubtitleProperties subtitleProperties, int timeBetweenSubtitles ) : bool

Creates a subtitle based on the subtitle at the specified index and adds it to the collection, inserting it right after that index.

The newly created subtitle's times will be based on the specified subtitle. Its duration will be SubtitleConstants.MaxSingleLineSubtitleDuration.

AddNewAt ( int index, SubtitleProperties subtitleProperties ) : bool

Creates a subtitle and adds it to the collection, inserting it at the specified index.

The newly created subtitle's start time will be zero and its duration will be SubtitleConstants.MaxSingleLineSubtitleDuration.

AddNewAt ( int index, SubtitleProperties subtitleProperties, System.TimeSpan start ) : bool

Creates a subtitle and adds it to the collection, inserting it at the specified index and with the specified start time.

The newly created subtitle's duration will be SubtitleConstants.MaxSingleLineSubtitleDuration.

AddNewBefore ( int index, SubtitleProperties subtitleProperties ) : bool

Creates a subtitle based on the subtitle at the specified index and adds it to the collection, inserting it right before that index.

The newly created subtitle's times will be based on the specified subtitle. Its end time will be the start time of the existing subtitle minus SubtitleConstants.MinTimeBetweenSubtitles. Its duration will be SubtitleConstants.MaxSingleLineSubtitleDuration. Both times will be wrapped to zero if they are less than zero.

AddNewBefore ( int index, SubtitleProperties subtitleProperties, int timeBetweenSubtitles ) : bool

Creates a subtitle based on the subtitle at the specified index and adds it to the collection, inserting it right before that index.

The newly created subtitle's times will be based on the specified subtitle. Its duration will be SubtitleConstants.MaxSingleLineSubtitleDuration. Both the start and end times times will be wrapped to zero if they are negative.

Clone ( SubtitleProperties propertiesClone ) : SubtitleCollection
Contains ( int index ) : bool

Checks whether a subtitle with the specified index exists in the collection.

Get ( int index ) : Subtitle

Returns the subtitle at the specified index.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that can iterate through the collection.

Remove ( int index ) : void

Removes a subtitle from the collection, given its index.

ToString ( ) : string
this ( int index ) : Subtitle

비공개 메소드들

메소드 설명
SetPropertiesForAll ( SubtitleProperties properties ) : void

메소드 상세

Add() 공개 메소드

Adds a subtitle to the end of the collection.
public Add ( Subtitle subtitle ) : void
subtitle Subtitle The subtitle to add.
리턴 void

Add() 공개 메소드

Adds a subtitle to the collection, inserting it at the specified index.
public Add ( Subtitle subtitle, int index ) : void
subtitle Subtitle The subtitle to add.
index int The zero-based index at which the subtitle should be inserted.
리턴 void

AddNewAfter() 공개 메소드

Creates a subtitle based on the subtitle at the specified index and adds it to the collection, inserting it right after that index.
The newly created subtitle's times will be based on the specified subtitle. Its start time will be the end time of the existing subtitle plus SubtitleConstants.MinTimeBetweenSubtitles. Its duration will be SubtitleConstants.MaxSingleLineSubtitleDuration.
public AddNewAfter ( int index, SubtitleProperties subtitleProperties ) : bool
index int The zero-based index after which the subtitle should be inserted.
subtitleProperties SubtitleProperties The SubtitleProperties of the subtitles.
리턴 bool

AddNewAfter() 공개 메소드

Creates a subtitle based on the subtitle at the specified index and adds it to the collection, inserting it right after that index.
The newly created subtitle's times will be based on the specified subtitle. Its duration will be SubtitleConstants.MaxSingleLineSubtitleDuration.
public AddNewAfter ( int index, SubtitleProperties subtitleProperties, int timeBetweenSubtitles ) : bool
index int The zero-based index after which the subtitle should be inserted.
subtitleProperties SubtitleProperties The SubtitleProperties of the subtitles.
timeBetweenSubtitles int The gap to keep after the existing subtitle, in milliseconds.
리턴 bool

AddNewAt() 공개 메소드

Creates a subtitle and adds it to the collection, inserting it at the specified index.
The newly created subtitle's start time will be zero and its duration will be SubtitleConstants.MaxSingleLineSubtitleDuration.
public AddNewAt ( int index, SubtitleProperties subtitleProperties ) : bool
index int The zero-based index at which the subtitle should be inserted.
subtitleProperties SubtitleProperties The SubtitleProperties of the subtitles.
리턴 bool

AddNewAt() 공개 메소드

Creates a subtitle and adds it to the collection, inserting it at the specified index and with the specified start time.
The newly created subtitle's duration will be SubtitleConstants.MaxSingleLineSubtitleDuration.
public AddNewAt ( int index, SubtitleProperties subtitleProperties, System.TimeSpan start ) : bool
index int The zero-based index at which the subtitle should be inserted.
subtitleProperties SubtitleProperties The SubtitleProperties of the subtitles.
start System.TimeSpan
리턴 bool

AddNewBefore() 공개 메소드

Creates a subtitle based on the subtitle at the specified index and adds it to the collection, inserting it right before that index.
The newly created subtitle's times will be based on the specified subtitle. Its end time will be the start time of the existing subtitle minus SubtitleConstants.MinTimeBetweenSubtitles. Its duration will be SubtitleConstants.MaxSingleLineSubtitleDuration. Both times will be wrapped to zero if they are less than zero.
public AddNewBefore ( int index, SubtitleProperties subtitleProperties ) : bool
index int The zero-based index before which the subtitle should be inserted.
subtitleProperties SubtitleProperties The SubtitleProperties of the subtitles.
리턴 bool

AddNewBefore() 공개 메소드

Creates a subtitle based on the subtitle at the specified index and adds it to the collection, inserting it right before that index.
The newly created subtitle's times will be based on the specified subtitle. Its duration will be SubtitleConstants.MaxSingleLineSubtitleDuration. Both the start and end times times will be wrapped to zero if they are negative.
public AddNewBefore ( int index, SubtitleProperties subtitleProperties, int timeBetweenSubtitles ) : bool
index int The zero-based index before which the subtitle should be inserted.
subtitleProperties SubtitleProperties The SubtitleProperties of the subtitles.
timeBetweenSubtitles int The gap to keep before the existing subtitle, in milliseconds.
리턴 bool

Clone() 공개 메소드

public Clone ( SubtitleProperties propertiesClone ) : SubtitleCollection
propertiesClone SubtitleProperties
리턴 SubtitleCollection

Contains() 공개 메소드

Checks whether a subtitle with the specified index exists in the collection.
public Contains ( int index ) : bool
index int The zero-based index.
리턴 bool

Get() 공개 메소드

Returns the subtitle at the specified index.
public Get ( int index ) : Subtitle
index int The zero-based subtitle's index.
리턴 Subtitle

GetEnumerator() 공개 메소드

Returns an enumerator that can iterate through the collection.
public GetEnumerator ( ) : IEnumerator
리턴 IEnumerator

Remove() 공개 메소드

Removes a subtitle from the collection, given its index.
public Remove ( int index ) : void
index int The zero-based index of the subtitle to be removed.
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

this() 공개 메소드

public this ( int index ) : Subtitle
index int
리턴 Subtitle