/// <summary> /// Write a subtitle to the file. /// </summary> /// <param name="file">output file</param> /// <param name="row">row number - not used</param> /// <param name="sub">subtitle to write</param> public override void writeSubtitle(StreamWriter file, int row, Sub sub) { file.WriteLine("{" + timeSpanToFrame(sub.Begin, FrameRate) + "}{" + timeSpanToFrame(sub.End, FrameRate) + "}" + sub.Text); }
/// <summary> /// Write a subtitle. /// </summary> /// <param name="file">File with subtitles</param> /// <param name="sub">A subtitle to write.</param> public abstract void writeSubtitle(StreamWriter file, int row, Sub sub);
/// <summary> /// Write a subtitle to the file. /// </summary> /// <param name="file">output file</param> /// <param name="row">number of row</param> /// <param name="sub">subtitle</param> public override void writeSubtitle(StreamWriter file, int row, Sub sub) { file.WriteLine(row); file.WriteLine(sub.Begin.ToString("hh':'mm':'ss','fff") + " --> " + sub.End.ToString("hh':'mm':'ss','fff")); String[] lines = sub.Text.Split('|'); for (int j = 0; j < lines.Length; j++) { file.WriteLine(lines[j]); } file.WriteLine(); }
/// <summary> /// Write a subtitle to the file. /// </summary> /// <param name="file">output file</param> /// <param name="row">row number - not used</param> /// <param name="sub">subtitle to write</param> public override void writeSubtitle(StreamWriter file, int row, Sub sub) { file.WriteLine("{" + timeSpanToFrame(sub.Begin,FrameRate) + "}{" + timeSpanToFrame(sub.End,FrameRate) + "}" + sub.Text); }