/// <summary>Initializes a new instance of the <see cref="Subtitle" /> class, given the /// global subtitles' properties and the subtitle's text and style.</summary> /// <param name="properties">The subtitles' properties.</param> /// <param name="text">The subtitle's text.</param> /// <param name="style">The subtitle's style.</param> public Subtitle (SubtitleProperties properties, SubtitleText text, Style style) { this.properties = properties; this.text = text; this.style = style; times = new Times(this); frames = new Frames(this); }
/* Private methods */ private void SetFieldsForDeepClone(SubtitleProperties properties, Times times, Frames frames, SubtitleText text, SubtitleText translation, Style style) { this.properties = properties; this.times = times; this.frames = frames; this.text = text; this.translation = translation; this.style = style; }
/* Private methods */ private void SetFieldsForDeepClone (SubtitleProperties properties, Times times, Frames frames, SubtitleText text, SubtitleText translation, Style style) { this.properties = properties; this.times = times; this.frames = frames; this.text = text; this.translation = translation; this.style = style; }
private void ParseFrames (Match match, Frames frames, Frames previousFrames) { int result = 0; if (ParseGroup(match, "StartFrame", ref result)) frames.PreciseStart = result; else if (ParseGroup(match, "StartElapsedFrames", ref result)) { double lastFrames = (previousFrames == null ? 0 : previousFrames.PreciseEnd); frames.PreciseStart = lastFrames + result; } if (ParseGroup(match, "EndFrame", ref result)) frames.PreciseEnd = result; else if (ParseGroup(match, "EndElapsedFrames", ref result)) { frames.PreciseDuration = result; } }