public Line() { Layer = 0; StartTime = new STime(0, 0, 0); EndTime = new STime(0, 0, 0); Style = "Default"; Margin = new Margin(0, 0, 0); LineType = LineTypes.Dialogue; }
public Line(Int32 layer, STime start, STime end, LineTypes type, String styleName, String name, Margin margin, String effect, String text) { Layer = layer; StartTime = start; EndTime = end; LineType = type; Text = text; Effect = effect; Name = name; Margin = margin; Style = styleName; }
public static Boolean TryParse(String timeString, out STime subtitletime) { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; subtitletime = null; var parts = timeString.Split(':'); if (String.IsNullOrEmpty(timeString) || parts.Length != 3) return false; int h, m; double d; if (!int.TryParse(parts[0], out h) || !int.TryParse(parts[1], out m) || !double.TryParse(parts[2], out d)) return false; subtitletime = new STime(h, m, d); return true; }
/// <summary> /// Shifts the starttime and backtime of the line forward /// </summary> public void ShiftForward(STime shiftingTime) { StartTime += shiftingTime; EndTime += shiftingTime; }
/// <summary> /// Shifts the starttime and backtime of the line backwards /// </summary> public void ShiftBackward(STime shiftingTime) { StartTime -= shiftingTime; EndTime -= shiftingTime; }