unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label7: TLabel;
Label8: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
begin
if radiobutton1.Checked = true and Checkbox1.Checked = true and Checkbox2.Checked =true then
begin
label7.Caption:= floattostr(strtofloat(edit1.Text)+strtofloat(edit2.Text));
end;
if radiobutton1.Checked = true and checkbox1.Checked =true and checkbox3.Checked =true then
begin
label7.caption:= floattostr(strtofloat(edit1.Text)+strtofloat(edit3.Text));
end;
if radiobutton1.Checked = true and Checkbox1.Checked = true and Checkbox4.Checked =true then
begin
label7.Caption:= floattostr(strtofloat(edit1.Text)+strtofloat(edit4.Text));
end;
if radiobutton1.Checked = true and checkbox2.Checked =true and checkbox3.Checked =true then
begin
label7.caption:= floattostr(strtofloat(edit2.Text)+strtofloat(edit3.Text));
end;
if radiobutton1.Checked = true and Checkbox2.Checked = true and Checkbox4.Checked =true then
begin
label7.Caption:= floattostr(strtofloat(edit2.Text)+strtofloat(edit4.Text));
end;
if radiobutton1.Checked = true and checkbox3.Checked =true and checkbox4.Checked =true then
begin
label7.caption:= floattostr(strtofloat(edit3.Text)+strtofloat(edit4.Text));
end;
if radiobutton1.Checked = true and Checkbox1.Checked = true and Checkbox2.Checked =true and Checkbox3.Checked =true then
begin
label7.Caption:= floattostr(strtofloat(edit1.Text)+strtofloat(edit2.Text)+strtofloat(edit3.Text));
end;
if radiobutton1.Checked = true and checkbox1.Checked =true and checkbox3.Checked =true and Checkbox4.Checked =true then
begin
label7.caption:= floattostr(strtofloat(edit1.Text)+strtofloat(edit3.Text)+strtofloat(edit4.Text));
end;
if radiobutton1.Checked = true and Checkbox4.Checked = true and Checkbox2.Checked =true and Checkbox3.Checked =true then
begin
label7.Caption:= floattostr(strtofloat(edit4.Text)+strtofloat(edit2.Text)+strtofloat(edit3.Text));
end;
if radiobutton1.Checked = true and checkbox1.Checked =true and checkbox2.Checked =true and Checkbox3.Checked =true and Checkbox4.Checked =true then
begin
label7.caption:= floattostr(strtofloat(edit1.Text)+strtofloat(edit2.Text)+strtofloat(edit3.Text)+strtofloat(edit4.Text));
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
close;
end;
end.