public ASSEvent EndReplace(double end) { ASSEvent result = this.MemberwiseClone() as ASSEvent; result.End = end; return(result); }
public static ASS FromFile(string filename) { using (StreamReader fin = new StreamReader(new FileStream(filename, FileMode.Open), Encoding.Unicode)) { ASS ass = new ASS(); ass.Header = new List <string>(); ass.Events = new List <ASSEvent>(); bool isHeader = true; while (true) { string line = fin.ReadLine(); if (line == null) { break; } ASSEvent ev = ASSEvent.FromString(line); if (ev == null && isHeader) { ass.Header.Add(line); } else { if (ev != null) { ass.Events.Add(ev); } isHeader = false; } } return(ass); } }
public ASSEvent TextReplace(string text) { ASSEvent result = this.MemberwiseClone() as ASSEvent; result.Text = text; return(result); }
public ASSEvent StartReplace(double start) { ASSEvent result = this.MemberwiseClone() as ASSEvent; result.Start = start; return(result); }
public ASSEvent LayerReplace(int layer) { ASSEvent result = this.MemberwiseClone() as ASSEvent; result.Layer = layer; return(result); }
public ASSEvent StyleReplace(string style) { ASSEvent result = this.MemberwiseClone() as ASSEvent; result.Style = style; return(result); }
public ASSEvent Last_ChangeEnd(double last) { ASSEvent result = this.MemberwiseClone() as ASSEvent; result.End = result.Start + last; return(result); }
public ASSEvent EndOffset(double offset) { ASSEvent result = this.MemberwiseClone() as ASSEvent; result.End += offset; return(result); }
public ASSEvent StartOffset(double offset) { ASSEvent result = this.MemberwiseClone() as ASSEvent; result.Start += offset; return(result); }