Registriert seit: 26. Nov 2003
Ort: Halle/Saale
4.343 Beiträge
Delphi 11 Alexandria
|
AW: Startzähler für Programm erstellen (Wichtig)
10. Sep 2011, 14:38
ein Beispiel:
Delphi-Quellcode:
procedure ReadOptionsIni;
var
IniFile: TIniFile;
begin
IniFile := TIniFile.Create(Path + OptionsIniFileName);
KOResultsPosition := 0;//TKOResultsPosition(IniFile.ReadInteger('Options', 'KOResultsPosition', 0));
ShowingTimePanels := IniFile.ReadBool('Options', 'ShowingTimePanels', True);
GamePaperAuto := IniFile.ReadBool('Options', 'GamePaperAuto', True);
GamePaperPictures := 0;//TGamePaperPictures(IniFile.ReadInteger('Options', 'GamePaperPictures', 0));
RecoverMinutes := IniFile.ReadInteger('Options', 'RecoverMinutes', 5);
PlayerNameAbbr := IniFile.ReadInteger('Options', 'PlayerNameAbbr', 0);
AutoSaveMinutes := IniFile.ReadInteger('Options', 'AutoSaveMinutes', 0);
HelpMode := IniFile.ReadInteger('Options', 'HelpMode', 0);
IniFile.Free;
...
end;
procedure WriteOptionsIni;
var
IniFile: TIniFile;
begin
IniFile := TIniFile.Create(Path + OptionsIniFileName);
IniFile.WriteInteger('Options', 'KOResultsPosition', Integer(KOResultsPosition));
IniFile.WriteBool('Options', 'ShowingTimePanels', ShowingTimePanels);
IniFile.WriteBool('Options', 'GamePaperAuto', GamePaperAuto);
IniFile.WriteInteger('Options', 'GamePaperPictures', Integer(GamePaperPictures));
IniFile.WriteInteger('Options', 'RecoverMinutes', RecoverMinutes);
IniFile.WriteInteger('Options', 'PlayerNameAbbr', PlayerNameAbbr);
IniFile.WriteInteger('Options', 'AutoSaveMinutes', AutoSaveMinutes);
IniFile.WriteInteger('Options', 'HelpMode', HelpMode);
IniFile.Free;
end;
|
|
Zitat
|