unit Unit1;
interface
uses
Winapi.Windows,
Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics,
Vcl.Controls,
Vcl.Forms,
Vcl.Dialogs,
Vcl.ComCtrls, IniFiles,
Vcl.StdCtrls,
Vcl.ExtCtrls;
type
TForm1 =
class(TForm)
LBName: TListBox;
Bevel1: TBevel;
Label1: TLabel;
Label2: TLabel;
LBVorname: TListBox;
Label3: TLabel;
LBPin: TListBox;
ScrollBar1: TScrollBar;
procedure FormCreate(Sender: TObject);
procedure GetList(i: Integer);
private
{ Private-Deklarationen }
vorname:
array of String;
name:
array of String;
pin:
array of Integer;
bearb:
array of Boolean;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var ini: TInifile; inte: Integer;
begin
ini := TIniFile.Create('
C:\ProgramData\L-Write\crepesworker_user.ini');
try
inte := ini.ReadInteger('
Anzahl', '
Anzahl', 0);
finally
ini.Free;
SetLength(vorname, inte);
SetLength(
name, inte);
SetLength(pin, inte);
SetLength(bearb, inte);
GetList(inte);
end;
Scrollbar1.Max := inte;
end;
procedure TForm1.GetList(i: Integer);
var ini: Tinifile; int: Integer; suchnach:
String;
begin
ini := Tinifile.Create('
C:\ProgramData\L-Write\crepesworker_user.ini');
try
for int := 1
to i
do begin
suchnach := '
User'+IntToStr(int);
vorname[i] := ini.ReadString(suchnach, '
Vorname', '
Not_found');
name[i] := ini.ReadString(suchnach, '
Name', '
Not_found');
pin[i] := ini.ReadInteger(suchnach, '
Pin', 0);
bearb[i] := ini.ReadBool(suchnach, '
Bearb', true);
end;
finally
ini.Free
end;
end;
end.