unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Generics.Collections;
type
TmyZKS =
class
ZKSID : Integer;
ZKSExportTab : AnsiString;
constructor Create(
const ZKSID: Integer;
const ZKSExportTab : AnsiString);
end;
type
TZKSConfig =
class
private
public
ZKSType : TObjectList<TmyZKS>;
ZKSExport : TStringList;
constructor Create;
destructor Destroy;
override;
end;
type
TForm2 =
class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form2 : TForm2;
myConfig : TZKSConfig;
implementation
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
begin
Close;
end;
{ TmyZKS }
constructor TmyZKS.Create(
const ZKSID: Integer;
const ZKSExportTab: AnsiString);
begin
Self.ZKSID := ZKSID;
Self.ZKSExportTab := ZKSExportTab;
end;
procedure TForm2.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
myConfig.Free;
end;
procedure TForm2.FormShow(Sender: TObject);
begin
myConfig.Create;
end;
{ TZKSConfig }
constructor TZKSConfig.Create;
begin
// Hier knallt es!
ZKSType := TObjectList<TmyZKS>.Create();
ZKSExport := TStringList.Create;
end;
destructor TZKSConfig.Destroy;
begin
ZKSExport.Free;
ZKSType.Free;
inherited;
end;
end.