unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls, ExtCtrls;
type
TForm2 =
class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
Beenden1: TMenuItem;
Speichern1: TMenuItem;
GroupBox1: TGroupBox;
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
ComboBox1: TComboBox;
GroupBox2: TGroupBox;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
procedure Beenden1Click(Sender: TObject);
procedure Speichern1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Speichern1Click(Sender: TObject);
var speichername, speicheralter, speichergeschlecht:TStringList;
begin
begin
speichername:=TStringList.Create;
speichername.Add(Edit1.Text);
speichername.SaveToFile('
Name/'+Edit1.Text+'
.Name.txt');
end;
begin
speicheralter:=TStringList.Create;
speicheralter.Add(ComboBox1.Text);
speicheralter.SaveToFile('
Alter/'+Edit1.Text+'
.Alter.txt');
end;
begin
speichergeschlecht:=TStringList.Create;
begin
if RadioButton1.Checked=True
then
speichergeschlecht.Add('
männlich')
else
speichergeschlecht.Add('
weiblich');
end;
speichergeschlecht.SaveToFile('
Geschlecht/'+Edit1.Text+'
.Geschlecht.txt');
end;
begin
Form2.Close;
end;
end;
end.