diff --git a/usubripfile.pas b/usubripfile.pas index 6d3a70a..d6b021b 100644 --- a/usubripfile.pas +++ b/usubripfile.pas @@ -40,7 +40,7 @@ interface { TCustomSubripFile } - TCustomSubripFile = specialize TGenericSubtitleFile; + TCustomSubripFile = specialize TGenericSubtitleFile; { TSubripFile } @@ -62,7 +62,7 @@ procedure TSubripFile.LoadFromString(const AContents: String); var sa: TStringArray; sl: TStringList; - Dlg: TPlainSubtitleDialog; + Dlg: TPlainSubtitleEvent; i,j,k: Integer; begin if AContents = EmptyStr then Exit; @@ -75,7 +75,7 @@ procedure TSubripFile.LoadFromString(const AContents: String); finally sl.Free; end; - Dialogs.Capacity := Length(sa) div 3; + Events.Capacity := Length(sa) div 3; i := 0; while i >= 0 do begin @@ -91,7 +91,7 @@ procedure TSubripFile.LoadFromString(const AContents: String); Dlg.Text := Dlg.Text +sa[k] +LineEnding; Inc(k); until (k > High(sa)) or (k >= j-1); - Dialogs.Add(Dlg); + Events.Add(Dlg); end; end; end; @@ -101,11 +101,11 @@ procedure TSubripFile.SaveToString(out AContents: String); i: Integer; begin AContents := EmptyStr; - for i := 0 to Dialogs.Count-1 do + for i := 0 to Events.Count-1 do begin AContents := AContents +(i+1).ToString +LineEnding - +Dialogs[i].TimeSlice.ValueAsString +LineEnding - +Dialogs[i].Text; + +Events[i].TimeSlice.ValueAsString +LineEnding + +Events[i].Text; end; end;