(Gast)
n/a Beiträge
|
Re: record
24. Jan 2009, 16:41
Ich glaube er will das ganze speichern
Delphi-Quellcode:
procedure SaveHSList(Filename: String; const List: THighscoreEintrag);
var
F: File of THighscoreEintrag;
i: Integer;
begin
try
if FileExists(Filename) then
case messagedlg( 'Datei existiert bereits'#13#10'Datei überschreiben', mtConfirmation, [mbYes, mbNo, mbCancel], 0 ) of
MRNO:
begin
Filename := inputbox('New filename', 'Type in an another filename', '');
SaveHSList(Filename, List);
EXIT;
end;
MRCancel: EXIT;
end;
AssignFile(F, Filename);
Rewrite(F);
for i := low(List) to High(List) do
BlockWrite(F, List[i], SizeOf(THighscoreEintrag));
finally
CloseFile(F);
end;
end;
|
|
Zitat
|