unit UnitBerechnen;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, TabNotBk, Menus, Math, ShellAPI;
type
TForm1 =
class(TForm)
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
TabSheet3: TTabSheet;
TabSheet4: TTabSheet;
QBild: TShape;
QLba1: TLabel;
QLba2: TLabel;
QLbSeitenlaenge: TLabel;
QLbUmfang: TLabel;
QLbFlaeche: TLabel;
QEdLaenge: TEdit;
QEdUmfang: TEdit;
QEdFlaeche: TEdit;
QBtRechnen: TButton;
RBild: TShape;
RLbb2: TLabel;
RLbSeitenlaengeb: TLabel;
RLbUmfang: TLabel;
RLbFlaeche: TLabel;
REdLaengea: TEdit;
REdUmfang: TEdit;
REdFlaeche: TEdit;
RLbSeitenlaengea: TLabel;
REdLaengeb: TEdit;
KBild: TShape;
QLbA: TLabel;
RLbA: TLabel;
RBtRechnen: TButton;
KLbRadius: TLabel;
KLbDurchmesser: TLabel;
KLbUmfang: TLabel;
KLbFlaeche: TLabel;
KEdRadius: TEdit;
KEdDurchmesser: TEdit;
KEdUmfang: TEdit;
KEdFlaeche: TEdit;
KBtRechnen: TButton;
rDLbWinkelb: TLabel;
rDEdBeta: TEdit;
rDLbSeitenlaengea: TLabel;
rDEdLaengea: TEdit;
rDLbSeitenlaengeb: TLabel;
rDEdLaengeb: TEdit;
rDLbSeitenlaengec: TLabel;
rDEdLaengec: TEdit;
TabSheet5: TTabSheet;
rDLbbeta: TLabel;
rDLbWinkela: TLabel;
rDLbalpha: TLabel;
rDEdAlpha: TEdit;
rDLbFlaeche: TLabel;
rDEdFlaeche: TEdit;
rDBtRechnen: TButton;
KRadiusStrich: TShape;
KLbR: TLabel;
rDLbUmfang: TLabel;
rDEdUmfang: TEdit;
rDBild: TImage;
rDLba1: TLabel;
rDLbc1: TLabel;
rDLbb1: TLabel;
RLba1: TLabel;
rDBildColor: TShape;
rDLbA: TLabel;
aDBild: TImage;
aDLba1: TLabel;
aDLbc1: TLabel;
aDLbb1: TLabel;
aDBildColor: TShape;
aDLbA: TLabel;
aDEdAlpha: TEdit;
aDLbWinkela: TLabel;
aDLbAlpha: TLabel;
aDEdBeta: TEdit;
aDLbWinkelb: TLabel;
aDLbBeta: TLabel;
aDEdLaengea: TEdit;
aDLbSeitenlaengea: TLabel;
aDLbSeitenlaengeb: TLabel;
aDEdLaengeb: TEdit;
aDLbSeitenlaengec: TLabel;
aDEdLaengec: TEdit;
aDLbUmfang: TLabel;
aDEdUmfang: TEdit;
aDLbFlaeche: TLabel;
aDEdFlaeche: TEdit;
aDEdGamma: TEdit;
aDLbWinkelg: TLabel;
aDLbGamma: TLabel;
aDBtRechnen: TButton;
PageControlKoerper: TPageControl;
TabSheet6: TTabSheet;
PageControlFlaechen: TPageControl;
MainMenu1: TMainMenu;
Einstellungen1: TMenuItem;
Farbe1: TMenuItem;
Rot1: TMenuItem;
Blau1: TMenuItem;
Gelb1: TMenuItem;
Wei1: TMenuItem;
Hilfe1: TMenuItem;
Hilfe2: TMenuItem;
N1: TMenuItem;
Info1: TMenuItem;
Berechnungen1: TMenuItem;
Startseite1: TMenuItem;
N2: TMenuItem;
Flchen1: TMenuItem;
Krper1: TMenuItem;
TabSheet7: TTabSheet;
TabSheet8: TTabSheet;
TabSheet9: TTabSheet;
TabSheet10: TTabSheet;
WLbKantenlaenge: TLabel;
WEdKanten: TEdit;
WLbGesamtkantenlaenge: TLabel;
WEdDiagonale: TEdit;
WLbRaumdiagonale: TLabel;
WEdGesamtkanten: TEdit;
WLbVolumen: TLabel;
WEdVolumen: TEdit;
WEdOberflaeche: TEdit;
WLbOberflaeche: TLabel;
WBtRechnen: TButton;
QuLbKantenlaengec: TLabel;
QuEdKantec: TEdit;
QuLbRaumdiagonale: TLabel;
QuEdDiagonale: TEdit;
QuLbGesamtkantenlaenge: TLabel;
QuEdGesamtkanten: TEdit;
QuLbOberflaeche: TLabel;
QuEdOberflaeche: TEdit;
QuLbVolumen: TLabel;
QuEdVolumen: TEdit;
QuEdKanteb: TEdit;
QuLbKantenlaengeb: TLabel;
QuLbKantenlaengea: TLabel;
QuEdKantea: TEdit;
QuBtRechnen: TButton;
KuLbRadius: TLabel;
KuEdRadius: TEdit;
KuEdDurchmesser: TEdit;
KuLbDurchmesser: TLabel;
KuEdVolumen: TEdit;
KuLbVolumen: TLabel;
KuEdOberflaeche: TEdit;
KuLbOberflaeche: TLabel;
KuBtRechnen: TButton;
Grn1: TMenuItem;
KuBild: TImage;
KuBildColor: TShape;
KuRadiusStrich: TShape;
KuLbR: TLabel;
WBild: TImage;
WBildColor: TShape;
WLba1: TLabel;
WLba3: TLabel;
WLba2: TLabel;
WLbV: TLabel;
QuBild: TImage;
QuBildColor: TShape;
QuLba1: TLabel;
QuLbc1: TLabel;
QuLbb1: TLabel;
QuLbV: TLabel;
ZBild1: TShape;
ZBild4: TShape;
ZBild2: TShape;
ZBild3: TShape;
ZLbRadius: TLabel;
ZEdRadius: TEdit;
ZLbOberflaeche: TLabel;
ZEdOberflaeche: TEdit;
ZLbVolumen: TLabel;
ZEdVolumen: TEdit;
ZEdHoehe: TEdit;
ZLbHoehe: TLabel;
ZLbMantel: TLabel;
ZEdMantel: TEdit;
ZLbGrundflaeche: TLabel;
ZEdGrundflaechen: TEdit;
ZBtRechnen: TButton;
ZRadiusstrich: TShape;
ZLbR: TLabel;
ZLbh: TLabel;
TabSheet11: TTabSheet;
KeBild: TImage;
KeBildColor: TShape;
ZEdUmfang: TEdit;
ZLbUmfang: TLabel;
KeLbRadius: TLabel;
KeEdRadius: TEdit;
KeLbHoehe: TLabel;
KeEdHoehe: TEdit;
KeLbUmfang: TLabel;
KeEdUmfang: TEdit;
KeLbOberflaeche: TLabel;
KeEdOberflaeche: TEdit;
KeLbVolumen: TLabel;
KeEdVolumen: TEdit;
KeLbMantel: TLabel;
KeEdMantel: TEdit;
KeLbGrundflaeche: TLabel;
KeEdGrundflaeche: TEdit;
KeBtRechnen: TButton;
KeEdMantellinie: TEdit;
KeLbMantellinie: TLabel;
KeLbS: TLabel;
KeHoehestrich: TShape;
KeLbH: TLabel;
PLbHoehe: TLabel;
PEdHoehe: TEdit;
PLbSeitenkantenlaenge: TLabel;
PEdSeitenkante: TEdit;
PLbOberflaeche: TLabel;
PEdOberflaeche: TEdit;
PLbVolumen: TLabel;
PEdVolumen: TEdit;
PLbMantel: TLabel;
PEdMantel: TEdit;
PLbGrundflaeche: TLabel;
PEdGrundflaeche: TEdit;
PLbGrundkantenlaenge: TLabel;
PEdKantenlaenge: TEdit;
PBtRechnen: TButton;
PBild: TImage;
PBildColor: TShape;
PLba1: TLabel;
PLbH: TLabel;
PLba2: TLabel;
PLbs1: TLabel;
PHoehestrich: TShape;
TabSheet12: TTabSheet;
TEdKantenlaenge: TEdit;
TLbKantenlaenge: TLabel;
TEdHoehe: TEdit;
TLbHoehe: TLabel;
TLbOberflaeche: TLabel;
TEdOberflaeche: TEdit;
TLbVolumen: TLabel;
TEdVolumen: TEdit;
TLbMantel: TLabel;
TEdMantel: TEdit;
TLabelGrundflaeche: TLabel;
TEdGrundflaeche: TEdit;
TBtRechnen: TButton;
TBild: TImage;
TBildColor: TShape;
TLba2: TLabel;
TLba3: TLabel;
TLbH: TLabel;
TLba1: TLabel;
QBtLoeschen: TButton;
KBtLoeschen: TButton;
rDBtLoeschen: TButton;
RBtLoeschen: TButton;
aDBtLoeschen: TButton;
WBtLoeschen: TButton;
QuBtLoeschen: TButton;
KuBtLoeschen: TButton;
ZBtLoeschen: TButton;
KeBtLoeschen: TButton;
TBtLoeschen: TButton;
PBtLoeschen: TButton;
aDEdAlpha2: TEdit;
aDEdBeta2: TEdit;
aDEdGamma2: TEdit;
aDEdLaengea2: TEdit;
aDEdLaengeb2: TEdit;
aDEdLaengec2: TEdit;
aDEdUmfang2: TEdit;
aDEdFlaeche2: TEdit;
aDLbDreieck1: TLabel;
aDLbDreieck2: TLabel;
procedure QBtRechnenClick(Sender: TObject);
procedure RBtRechnenClick(Sender: TObject);
procedure KBtRechnenClick(Sender: TObject);
procedure rDBtRechnenClick(Sender: TObject);
procedure Flchen1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Rot1Click(Sender: TObject);
procedure Grn1Click(Sender: TObject);
procedure Blau1Click(Sender: TObject);
procedure Gelb1Click(Sender: TObject);
procedure Wei1Click(Sender: TObject);
procedure aDBtRechnenClick(Sender: TObject);
procedure Krper1Click(Sender: TObject);
procedure WBtRechnenClick(Sender: TObject);
procedure QuBtRechnenClick(Sender: TObject);
procedure KuBtRechnenClick(Sender: TObject);
procedure ZBtRechnenClick(Sender: TObject);
procedure KeBtRechnenClick(Sender: TObject);
procedure PBtRechnenClick(Sender: TObject);
procedure OnlyNumbers(Sender: TObject;
var Key: Char);
procedure EditClear(Sender: TObject);
procedure TBtRechnenClick(Sender: TObject);
procedure Hilfe2Click(Sender: TObject);
procedure QBtLoeschenClick(Sender: TObject);
procedure RBtLoeschenClick(Sender: TObject);
procedure KBtLoeschenClick(Sender: TObject);
procedure Info1Click(Sender: TObject);
procedure rDBtLoeschenClick(Sender: TObject);
procedure QEdLaengeChange(Sender: TObject);
procedure QEdUmfangChange(Sender: TObject);
procedure QEdFlaecheChange(Sender: TObject);
procedure KEdRadiusChange(Sender: TObject);
procedure KEdDurchmesserChange(Sender: TObject);
procedure KEdUmfangChange(Sender: TObject);
procedure rDEdAlphaChange(Sender: TObject);
procedure rDEdBetaChange(Sender: TObject);
procedure rDEdLaengeaChange(Sender: TObject);
procedure rDEdLaengebChange(Sender: TObject);
procedure rDEdLaengecChange(Sender: TObject);
procedure aDBtLoeschenClick(Sender: TObject);
procedure WBtLoeschenClick(Sender: TObject);
procedure WEdKantenChange(Sender: TObject);
procedure WEdDiagonaleChange(Sender: TObject);
procedure WEdGesamtkantenChange(Sender: TObject);
procedure QuBtLoeschenClick(Sender: TObject);
procedure KuBtLoeschenClick(Sender: TObject);
procedure KuEdRadiusChange(Sender: TObject);
procedure KuEdDurchmesserChange(Sender: TObject);
procedure ZBtLoeschenClick(Sender: TObject);
procedure ZEdRadiusChange(Sender: TObject);
procedure ZEdUmfangChange(Sender: TObject);
procedure aDEdAlphaChange(Sender: TObject);
procedure aDEdBetaChange(Sender: TObject);
procedure aDEdGammaChange(Sender: TObject);
procedure aDEdLaengeaChange(Sender: TObject);
procedure aDEdLaengebChange(Sender: TObject);
procedure aDEdLaengecChange(Sender: TObject);
procedure KeBtLoeschenClick(Sender: TObject);
procedure KeEdRadiusChange(Sender: TObject);
procedure KeEdHoeheChange(Sender: TObject);
procedure KeEdUmfangChange(Sender: TObject);
procedure KeEdMantellinieChange(Sender: TObject);
procedure PBtLoeschenClick(Sender: TObject);
procedure PEdHoeheChange(Sender: TObject);
procedure PEdSeitenkanteChange(Sender: TObject);
procedure TEdKantenlaengeChange(Sender: TObject);
procedure TEdHoeheChange(Sender: TObject);
procedure TBtLoeschenClick(Sender: TObject);
procedure allgLoeschen(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
uses UnitInfobox;
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
PageControlFlaechen.Visible := False;
PageControlKoerper.Visible := False;
Startseite1.Enabled := False;
Form1.Color := clWhite;
Form1.allgLoeschen(Sender);
end;
procedure TForm1.allgLoeschen(Sender: TObject);
begin
Form1.QBtLoeschenClick(Sender);
Form1.RBtLoeschenClick(Sender);
Form1.KBtLoeschenClick(Sender);
Form1.rDBtLoeschenClick(Sender);
Form1.aDBtLoeschenClick(Sender);
Form1.WBtLoeschenClick(Sender);
Form1.QuBtLoeschenClick(Sender);
Form1.KuBtLoeschenClick(Sender);
Form1.ZBtLoeschenClick(Sender);
Form1.KeBtLoeschenClick(Sender);
Form1.PBtLoeschenClick(Sender);
Form1.TBtLoeschenClick(Sender);
end;
(*-----------------------------------Menü-----------------------------------*)
procedure TForm1.Flchen1Click(Sender: TObject);
begin
Startseite1.Enabled := True;
Form1.Color := clBtnFace;
PageControlFlaechen.TabIndex := 0;
PageControlFlaechen.Visible := True;
PageControlKoerper.Visible := False;
Form1.allgLoeschen(Sender);
end;
procedure TForm1.Krper1Click(Sender: TObject);
begin
Startseite1.Enabled := True;
Form1.Color := clBtnFace;
PageControlKoerper.TabIndex := 0;
PageControlKoerper.Visible := True;
PageControlFlaechen.Visible := False;
Form1.allgLoeschen(Sender);
end;
procedure TForm1.Hilfe2Click(Sender: TObject);
begin
ShellExecute(
handle, '
open', PChar('
HELP.html'),
nil,
nil, SW_SHOW);
end;
procedure TForm1.Info1Click(Sender: TObject);
begin
Form2.ShowModal;
{Infobox öffnen}
end;
(*----------------------------------Farben----------------------------------*)
procedure TForm1.Rot1Click(Sender: TObject);
begin
Rot1.Checked := true;
Grn1.Checked := false;
Blau1.Checked := false;
Gelb1.Checked := false;
Wei1.Checked := false;
QBild.Brush.Color := clRed;
QLbA.Color := clRed;
RBild.Brush.Color := clRed;
RLbA.Color := clRed;
KBild.Brush.Color := clRed;
KLbR.Color := clRed;
rDBildColor.Brush.Color := clRed;
rDLbA.Color := clRed;
aDBildColor.Brush.Color := clRed;
aDLbA.Color := clRed;
WBildColor.Brush.Color := clRed;
WLba2.Color := clRed;
WLbV.Color := clRed;
QuBildColor.Brush.Color := clRed;
QuLbb1.Color := clRed;
QuLbV.Color := clRed;
KuBildColor.Brush.Color := clRed;
KuLbR.Color := clRed;
ZBild1.Brush.Color := clRed;
ZBild2.Brush.Color := clRed;
ZBild3.Brush.Color := clRed;
ZLbR.Color := clRed;
KeBildColor.Brush.Color := clRed;
KeLbH.Color := clRed;
PBildColor.Brush.Color := clRed;
PLbH.Color := clRed;
TBildColor.Brush.Color := clRed;
TLbH.Color := clRed;
end;
procedure TForm1.Grn1Click(Sender: TObject);
begin
Rot1.Checked := false;
Grn1.Checked := true;
Blau1.Checked := false;
Gelb1.Checked := false;
Wei1.Checked := false;
QBild.Brush.Color := clLime;
QLbA.Color := clLime;
RBild.Brush.Color := clLime;
RLbA.Color := clLime;
KBild.Brush.Color := clLime;
KLbR.Color := clLime;
rDBildColor.Brush.Color := clLime;
rDLbA.Color := clLime;
aDBildColor.Brush.Color := clLime;
aDLbA.Color := clLime;
WBildColor.Brush.Color := clLime;
WLba2.Color := clLime;
WLbV.Color := clLime;
QuBildColor.Brush.Color := clLime;
QuLbb1.Color := clLime;
QuLbV.Color := clLime;
KuBildColor.Brush.Color := clLime;
KuLbR.Color := clLime;
ZBild1.Brush.Color := clLime;
ZBild2.Brush.Color := clLime;
ZBild3.Brush.Color := clLime;
ZLbR.Color := clLime;
KeBildColor.Brush.Color := clLime;
KeLbH.Color := clLime;
PBildColor.Brush.Color := clLime;
PLbH.Color := clLime;
TBildColor.Brush.Color := clLime;
TLbH.Color := clLime;
end;
procedure TForm1.Blau1Click(Sender: TObject);
begin
Rot1.Checked := false;
Grn1.Checked := false;
Blau1.Checked := true;
Gelb1.Checked := false;
Wei1.Checked := false;
QBild.Brush.Color := clBlue;
QLbA.Color := clBlue;
RBild.Brush.Color := clBlue;
RLbA.Color := clBlue;
KBild.Brush.Color := clBlue;
KLbR.Color := clBlue;
rDBildColor.Brush.Color := clBlue;
rDLbA.Color := clBlue;
aDBildColor.Brush.Color := clBlue;
aDLbA.Color := clBlue;
WBildColor.Brush.Color := clBlue;
WLba2.Color := clBlue;
WLbV.Color := clBlue;
QuBildColor.Brush.Color := clBlue;
QuLbb1.Color := clBlue;
QuLbV.Color := clBlue;
KuBildColor.Brush.Color := clBlue;
KuLbR.Color := clBlue;
ZBild1.Brush.Color := clBlue;
ZBild2.Brush.Color := clBlue;
ZBild3.Brush.Color := clBlue;
ZLbR.Color := clBlue;
KeBildColor.Brush.Color := clBlue;
KeLbH.Color := clBlue;
PBildColor.Brush.Color := clBlue;
PLbH.Color := clBlue;
TBildColor.Brush.Color := clBlue;
TLbH.Color := clBlue;
end;
procedure TForm1.Gelb1Click(Sender: TObject);
begin
Rot1.Checked := false;
Grn1.Checked := false;
Blau1.Checked := false;
Gelb1.Checked := true;
Wei1.Checked := false;
QBild.Brush.Color := clYellow;
QLbA.Color := clYellow;
RBild.Brush.Color := clYellow;
RLbA.Color := clYellow;
KBild.Brush.Color := clYellow;
KLbR.Color := clYellow;
rDBildColor.Brush.Color := clYellow;
rDLbA.Color := clYellow;
aDBildColor.Brush.Color := clYellow;
aDLbA.Color := clYellow;
WBildColor.Brush.Color := clYellow;
WLba2.Color := clYellow;
WLbV.Color := clYellow;
QuBildColor.Brush.Color := clYellow;
QuLbb1.Color := clYellow;
QuLbV.Color := clYellow;
KuBildColor.Brush.Color := clYellow;
KuLbR.Color := clYellow;
ZBild1.Brush.Color := clYellow;
ZBild2.Brush.Color := clYellow;
ZBild3.Brush.Color := clYellow;
ZLbR.Color := clYellow;
KeBildColor.Brush.Color := clYellow;
KeLbH.Color := clYellow;
PBildColor.Brush.Color := clYellow;
PLbH.Color := clYellow;
TBildColor.Brush.Color := clYellow;
TLbH.Color := clYellow;
end;
procedure TForm1.Wei1Click(Sender: TObject);
begin
Rot1.Checked := false;
Grn1.Checked := false;
Blau1.Checked := false;
Gelb1.Checked := false;
Wei1.Checked := true;
QBild.Brush.Color := clWhite;
QLbA.Color := clWhite;
RBild.Brush.Color := clWhite;
RLbA.Color := clWhite;
KBild.Brush.Color := clWhite;
KLbR.Color := clWhite;
rDBildColor.Brush.Color := clWhite;
rDLbA.Color := clWhite;
aDBildColor.Brush.Color := clWhite;
aDLbA.Color := clWhite;
WBildColor.Brush.Color := clWhite;
WLba2.Color := clWhite;
WLbV.Color := clWhite;
QuBildColor.Brush.Color := clWhite;
QuLbb1.Color := clWhite;
QuLbV.Color := clWhite;
KuBildColor.Brush.Color := clWhite;
KuLbR.Color := clWhite;
ZBild1.Brush.Color := clWhite;
ZBild2.Brush.Color := clWhite;
ZBild3.Brush.Color := clWhite;
ZLbR.Color := clWhite;
KeBildColor.Brush.Color := clWhite;
KeLbH.Color := clWhite;
PBildColor.Brush.Color := clWhite;
PLbH.Color := clWhite;
TBildColor.Brush.Color := clWhite;
TLbH.Color := clWhite;
end;
(*----------------------------Edit-Einstellungen----------------------------*)
procedure TForm1.OnlyNumbers(Sender: TObject;
var Key: Char);
begin
if not (key
in [#48..#57, #8, #44])
then key := #0;
if (key = '
,')
then
if pos('
,', TEdit(Sender).Text) > 0
then
begin
key := #0; exit;
end;
end;
procedure TForm1.EditClear(Sender: TObject);
begin
if TEdit(Sender).
ReadOnly = false
then
if TEdit(Sender).Text = '
0'
then
TEdit(Sender).Text := '
';
end;
(*----------------------------------Flächen----------------------------------*)
(*_____Quadrat_____*)
procedure TForm1.QBtRechnenClick(Sender: TObject);
var a,u,Area :real;
begin
if QEdLaenge.Text > '
0'
then
begin
a := StrToFloat(QEdLaenge.Text);
u := 4*a;
Area := a*a;
QEdUmfang.Text := FloatToStr(u);
QEdFlaeche.Text := FloatToStr(Area);
end else
if QEdUmfang.Text > '
0'
then
begin
u := StrToFloat(QEdUmfang.Text);
a := u/4;
Area := a*a;
QEdLaenge.Text := FloatToStr(a);
QEdFlaeche.Text := FloatToStr(Area);
end else
if QEdFlaeche.Text > '
0'
then
begin
area := StrToFloat(QEdFlaeche.Text);
a := sqrt(area);
u := 4*a;
QEdLaenge.Text := FloatToStr(a);
QEdUmfang.Text := FloatToStr(u);
end;
QEdLaenge.
ReadOnly := true;
QEdUmfang.
ReadOnly := true;
QEdFlaeche.
ReadOnly := true;
QBtRechnen.Enabled := false;
end;
procedure TForm1.QBtLoeschenClick(Sender: TObject);
begin
QEdLaenge.Text := '
0';
QEdUmfang.Text := '
0';
QEdFlaeche.Text := '
0';
QEdLaenge.
ReadOnly := false;
QEdUmfang.
ReadOnly := false;
QEdFlaeche.
ReadOnly := false;
QBtRechnen.Enabled := true;
end;
procedure TForm1.QEdLaengeChange(Sender: TObject);
begin
if QEdLaenge.Text > '
0'
then
begin
QEdUmfang.
ReadOnly := true;
QEdFlaeche.
ReadOnly := true;
end else
begin
QEdUmfang.
ReadOnly := false;
QEdFlaeche.
ReadOnly := false;
end;
end;
procedure TForm1.QEdUmfangChange(Sender: TObject);
begin
if QEdUmfang.Text > '
0'
then
begin
QEdLaenge.
ReadOnly := true;
QEdFlaeche.
ReadOnly := true;
end else
begin
QEdLaenge.
ReadOnly := false;
QEdFlaeche.
ReadOnly := false;
end;
end;
procedure TForm1.QEdFlaecheChange(Sender: TObject);
begin
if QEdFlaeche.Text > '
0'
then
begin
QEdLaenge.
ReadOnly := true;
QEdUmfang.
ReadOnly := true;
end else
begin
QEdLaenge.
ReadOnly := false;
QEdUmfang.
ReadOnly := false;
end
end;
(*_____Rechteck_____*)
procedure TForm1.RBtRechnenClick(Sender: TObject);
var a,b,u,Area :real;
begin
if REdLaengea.Text > '
0'
then
if REdLaengeb.Text > '
0'
then
begin
a := StrToFloat(REdLaengea.Text);
b := StrToFloat(REdLaengeb.Text);
u := 2*a+2*b;
Area := a*b;
REdUmfang.Text := FloatToStr(u);
REdFlaeche.Text := FloatToStr(Area);
REdLaengea.
ReadOnly := true;
REdLaengeb.
ReadOnly := true;
REdUmfang.
ReadOnly := true;
REdFlaeche.
ReadOnly := true;
RBtRechnen.Enabled := false;
end;
end;
procedure TForm1.RBtLoeschenClick(Sender: TObject);
begin
REdLaengea.Text := '
0';
REdLaengeb.Text := '
0';
REdUmfang.Text := '
0';
REdFlaeche.Text := '
0';
REdLaengea.
ReadOnly := false;
REdLaengeb.
ReadOnly := false;
RBtRechnen.Enabled := true;
end;
(*_____Kreis_____*)
procedure TForm1.KBtRechnenClick(Sender: TObject);
var r,d,u,Area :real;
begin
if KEdRadius.Text > '
0'
then
begin
r := StrToFloat(KEdRadius.Text);
d := 2*r;
u := pi*d;
Area := pi*r*r;
KEdDurchmesser.Text := FloatToStrF (d,ffFixed,10,2);
KEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
KEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if KEdDurchmesser.Text > '
0'
then
begin
d := StrToFloat(KEdDurchmesser.Text);
r := d/2;
u := pi*d;
Area := pi*r*r;
KEdRadius.Text := FloatToStrF (r,ffFixed,10,2);
KEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
KEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if KEdUmfang.Text > '
0'
then
begin
u := StrToFloat(KEdUmfang.Text);
r := u/(2*pi);
d := 2*r;
Area := pi*r*r;
KEdRadius.Text := FloatToStrF (r,ffFixed,10,2);
KEdDurchmesser.Text := FloatToStrF(d,ffFixed,10,2);
KEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end;
KEdRadius.
ReadOnly := true;
KEdDurchmesser.
ReadOnly := true;
KEdUmfang.
ReadOnly := true;
KEdFlaeche.
ReadOnly := true;
KBtRechnen.Enabled := false;
end;
procedure TForm1.KBtLoeschenClick(Sender: TObject);
begin
KEdRadius.Text := '
0';
KEdDurchmesser.Text := '
0';
KEdUmfang.Text := '
0';
KEdFlaeche.Text := '
0';
KEdRadius.
ReadOnly := false;
KEdDurchmesser.
ReadOnly := false;
KEdUmfang.
ReadOnly := false;
KBtRechnen.Enabled := true;
end;
procedure TForm1.KEdRadiusChange(Sender: TObject);
begin
if KEdRadius.Text > '
0'
then
begin
KEdDurchmesser.
ReadOnly := true;
KEdUmfang.
ReadOnly := true;
end else
begin
KEdDurchmesser.
ReadOnly := false;
KEdUmfang.
ReadOnly := false;
end
end;
procedure TForm1.KEdDurchmesserChange(Sender: TObject);
begin
if KEdDurchmesser.Text > '
0'
then
begin
KEdRadius.
ReadOnly := true;
KEdUmfang.
ReadOnly := true;
end else
begin
KEdRadius.
ReadOnly := false;
KEdUmfang.
ReadOnly := false;
end
end;
procedure TForm1.KEdUmfangChange(Sender: TObject);
begin
if KEdUmfang.Text > '
0'
then
begin
KEdRadius.
ReadOnly := true;
KEdDurchmesser.
ReadOnly := true;
end else
begin
KEdRadius.
ReadOnly := false;
KEdDurchmesser.
ReadOnly := false;
end
end;
(*_____rechtwinkliges Dreieck_____*)
procedure TForm1.rDBtRechnenClick(Sender: TObject);
var alpha,beta,a,b,c,u,Area :real;
h,q,p :real;
begin
if rDEdAlpha.Text > '
0'
then
begin
if rDEdLaengea.Text > '
0'
then
begin
alpha := StrToFloat(rDEdAlpha.Text);
a := StrToFloat(rDEdLaengea.Text);
beta := 90-alpha;
b := a/Tan(DegtoRad(alpha));
c := sqrt(a*a+b*b);
u := a+b+c;
q := a*a/c;
p := c-q;
h := sqrt(p*q);
Area := (c*h)/2;
rDEdAlpha.Text := FloatToStr(alpha)+ '
°';
rDEdBeta.Text := FloatToStr(beta)+ '
°';
rDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
rDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
rDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
rDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if rDEdLaengeb.Text > '
0'
then
begin
alpha := StrToFloat(rDEdAlpha.Text);
b := StrToFloat(rDEdLaengeb.Text);
beta := 90-alpha;
a := b*Tan(DegtoRad(alpha));
c := sqrt(a*a+b*b);
u := a+b+c;
q := a*a/c;
p := c-q;
h := sqrt(p*q);
Area := (c*h)/2;
rDEdAlpha.Text := FloatToStr(alpha)+ '
°';
rDEdBeta.Text := FloatToStr(beta)+ '
°';
rDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
rDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
rDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
rDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if rDEdLaengec.Text > '
0'
then
begin
alpha := StrToFloat(rDEdAlpha.Text);
c := StrToFloat(rDEdLaengec.Text);
beta := 90-alpha;
a := c*Cos(DegtoRad(beta));
b := sqrt(c*c-a*a);
u := a+b+c;
q := a*a/c;
p := c-q;
h := sqrt(p*q);
Area := (c*h)/2;
rDEdAlpha.Text := FloatToStr(alpha)+ '
°';
rDEdBeta.Text := FloatToStr(beta)+ '
°';
rDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
rDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
rDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
rDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end
end else
if rDEdBeta.Text > '
0'
then
begin
if rDEdLaengea.Text > '
0'
then
begin
beta := StrToFloat(rDEdBeta.Text);
a := StrToFloat(rDEdLaengea.Text);
alpha := 90-beta;
b := a/Tan(DegtoRad(alpha));
c := sqrt(a*a+b*b);
u := a+b+c;
q := a*a/c;
p := c-q;
h := sqrt(p*q);
Area := (c*h)/2;
rDEdAlpha.Text := FloatToStr(alpha)+ '
°';
rDEdBeta.Text := FloatToStr(beta)+ '
°';
rDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
rDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
rDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
rDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if rDEdLaengeb.Text > '
0'
then
begin
beta := StrToFloat(rDEdBeta.Text);
b := StrToFloat(rDEdLaengeb.Text);
alpha:= 90-beta;
a := b*Tan(DegtoRad(alpha));
c := sqrt(a*a+b*b);
u := a+b+c;
q := a*a/c;
p := c-q;
h := sqrt(p*q);
Area := (c*h)/2;
rDEdAlpha.Text := FloatToStr(alpha)+ '
°';
rDEdBeta.Text := FloatToStr(beta)+ '
°';
rDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
rDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
rDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
rDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if rDEdLaengec.Text > '
0'
then
begin
beta := StrToFloat(rDEdBeta.Text);
c := StrToFloat(rDEdLaengec.Text);
alpha := 90-beta;
a := c*Cos(DegtoRad(beta));
b := sqrt(c*c-a*a);
u := a+b+c;
q := a*a/c;
p := c-q;
h := sqrt(p*q);
Area := (c*h)/2;
rDEdAlpha.Text := FloatToStr(alpha)+ '
°';
rDEdBeta.Text := FloatToStr(beta)+ '
°';
rDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
rDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
rDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
rDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end
end;
rDEdAlpha.
ReadOnly := true;
rDEdBeta.
ReadOnly := true;
rDEdLaengea.
ReadOnly := true;
rDEdLaengeb.
ReadOnly := true;
rDEdLaengec.
ReadOnly := true;
rDBtRechnen.Enabled := false;
end;
procedure TForm1.rDBtLoeschenClick(Sender: TObject);
begin
rDEdAlpha.Text := '
0';
rDEdBeta.Text := '
0';
rDEdLaengea.Text := '
0';
rDEdLaengeb.Text := '
0';
rDEdLaengec.Text := '
0';
rDEdUmfang.Text := '
0';
rDEdFlaeche.Text := '
0';
rDEdAlpha.
ReadOnly := false;
rDEdBeta.
ReadOnly := false;
rDEdLaengea.
ReadOnly := false;
rDEdLaengeb.
ReadOnly := false;
rDEdLaengec.
ReadOnly := false;
rDBtRechnen.Enabled := true;
end;
procedure TForm1.rDEdAlphaChange(Sender: TObject);
begin
if rDEdAlpha.Text > '
0'
then
rDEdBeta.
ReadOnly := true
else
rDEdBeta.
ReadOnly := false;
end;
procedure TForm1.rDEdBetaChange(Sender: TObject);
begin
if rDEdBeta.Text > '
0'
then
rDEdAlpha.
ReadOnly := true
else
rDEdAlpha.
ReadOnly := false;
end;
procedure TForm1.rDEdLaengeaChange(Sender: TObject);
begin
if rDEdLaengea.Text > '
0'
then
begin
rDEdLaengeb.
ReadOnly := true;
rDEdLaengec.
ReadOnly := true;
end else
begin
rDEdLaengeb.
ReadOnly := false;
rDEdLaengec.
ReadOnly := false;
end
end;
procedure TForm1.rDEdLaengebChange(Sender: TObject);
begin
if rDEdLaengeb.Text > '
0'
then
begin
rDEdLaengea.
ReadOnly := true;
rDEdLaengec.
ReadOnly := true;
end else
begin
rDEdLaengea.
ReadOnly := false;
rDEdLaengec.
ReadOnly := false;
end
end;
procedure TForm1.rDEdLaengecChange(Sender: TObject);
begin
if rDEdLaengec.Text > '
0'
then
begin
rDEdLaengea.
ReadOnly := true;
rDEdLaengeb.
ReadOnly := true;
end else
begin
rDEdLaengea.
ReadOnly := false;
rDEdLaengeb.
ReadOnly := false;
end
end;
(*_____allgemeines Dreieck_____*)
procedure TForm1.aDBtRechnenClick(Sender: TObject);
var alpha,beta,gamma,a,b,c,u,Area :real;
alpha2,beta2,gamma2,a2,b2,c2,u2,Area2 :real;
s,s2 :real;
begin
if aDEdLaengea.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
alpha := StrToFloat(aDEdAlpha.Text);
beta := StrToFloat(aDEdBeta.Text);
a := StrToFloat(aDEdLaengea.Text);
gamma := 180-alpha-beta;
b := a*Sin(DegtoRad(beta))/Sin(DegtoRad(alpha));
c := sqrt(a*a + b*b - 2*a*b*cos(DegtoRad(gamma)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
aDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if aDEdGamma.Text > '
0'
then
begin
alpha := StrToFloat(aDEdAlpha.Text);
gamma := StrToFloat(aDEdGamma.Text);
a := StrToFloat(aDEdLaengea.Text);
beta := 180-alpha-gamma;
b := a*Sin(DegtoRad(beta))/Sin(DegtoRad(alpha));
c := sqrt(a*a + b*b - 2*a*b*cos(DegtoRad(gamma)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
aDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if aDEdLaengeb.Text > '
0'
then
begin
try
alpha := StrToFloat(aDEdAlpha.Text);
a := StrToFloat(aDEdLaengea.Text);
b := StrToFloat(aDEdLaengeb.Text);
beta := RadtoDeg(arcsin(sin(DegtoRad(alpha))*b/a));
// !!
gamma := 180-alpha-beta;
c := sqrt(a*a + b*b - 2*a*b*cos(DegtoRad(gamma)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
beta2 := 90+(90-beta);
if beta2 > beta
then
begin
ShowMessage('
Dreieck mehrdeutig, 2 Lösungen vorhanden.');
gamma2 := 180-alpha-beta2;
c2 := sqrt(a*a + b*b - 2*a*b*cos(DegtoRad(gamma2)));
u2 := a+b+c2;
s2 := u2/2;
Area2 := sqrt(s2*(s2-a)*(s2-b)*(s2-c2));
aDEdAlpha2.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta2.Text := FloatToStrF(beta2,ffFixed,10,2)+ '
°';
aDEdGamma2.Text := FloatToStrF(gamma2,ffFixed,10,2)+ '
°';
aDEdLaengea2.Text := FloatToStr(a);
aDEdLaengeb2.Text := FloatToStr(b);
aDEdLaengec2.Text := FloatToStrF(c2,ffFixed,10,3);
aDEdUmfang2.Text := FloatToStrF(u2,ffFixed,10,3);
aDEdFlaeche2.Text := FloatToStrF(Area2,ffFixed,10,2);
aDEdAlpha.Width := 85;
aDEdBeta.Width := 85;
aDEdGamma.Width := 85;
aDEdLaengea.Width := 85;
aDEdLaengeb.Width := 85;
aDEdLaengec.Width := 85;
aDEdUmfang.Width := 85;
aDEdFlaeche.Width := 85;
aDEdAlpha2.Visible := true;
aDEdBeta2.Visible := true;
aDEdGamma2.Visible := true;
aDEdLaengea2.Visible := true;
aDEdLaengeb2.Visible := true;
aDEdLaengec2.Visible := true;
aDEdUmfang2.Visible := true;
aDEdFlaeche2.Visible := true;
aDLbDreieck1.Visible := true;
aDLbDreieck2.Visible := true;
end;
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
except
on EInvalidOp
do begin MessageDlg('
Dreieck nicht lösbar!', mtWarning, [mbOK], 0);
aDEdAlpha.Text := '
';
aDEdBeta.Text := '
Error!';
aDEdGamma.Text := '
';
aDEdLaengea.Text := '
';
aDEdLaengeb.Text := '
';
aDEdLaengec.Text := '
';
aDEdUmfang.Text := '
';
aDEdFlaeche.Text := '
';
end
end;
end else
if aDEdLaengec.Text > '
0'
then
begin
try
alpha := StrToFloat(aDEdAlpha.Text);
a := StrToFloat(aDEdLaengea.Text);
c := StrToFloat(aDEdLaengec.Text);
gamma := RadtoDeg(arcsin(sin(DegtoRad(alpha))*c/a));
// !!
beta := 180-alpha-gamma;
b := sqrt(a*a + c*c - 2*a*c*cos(DegtoRad(beta)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
gamma2 := 90+(90-gamma);
if gamma2 > gamma
then
begin
ShowMessage('
Dreieck mehrdeutig, 2 Lösungen vorhanden.');
beta2 := 180-alpha-gamma2;
b2 := sqrt(a*a + c*c - 2*a*c*cos(DegtoRad(beta2)));
u2 := a+b2+c;
s2 := u2/2;
Area2 := sqrt(s2*(s2-a)*(s2-b2)*(s2-c));
aDEdAlpha2.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta2.Text := FloatToStrF(beta2,ffFixed,10,2)+ '
°';
aDEdGamma2.Text := FloatToStrF(gamma2,ffFixed,10,2)+ '
°';
aDEdLaengea2.Text := FloatToStr(a);
aDEdLaengeb2.Text := FloatToStrF(b2,ffFixed,10,3);
aDEdLaengec2.Text := FloatToStr(c);
aDEdUmfang2.Text := FloatToStrF(u2,ffFixed,10,3);
aDEdFlaeche2.Text := FloatToStrF(Area2,ffFixed,10,2);
aDEdAlpha.Width := 85;
aDEdBeta.Width := 85;
aDEdGamma.Width := 85;
aDEdLaengea.Width := 85;
aDEdLaengeb.Width := 85;
aDEdLaengec.Width := 85;
aDEdUmfang.Width := 85;
aDEdFlaeche.Width := 85;
aDEdAlpha2.Visible := true;
aDEdBeta2.Visible := true;
aDEdGamma2.Visible := true;
aDEdLaengea2.Visible := true;
aDEdLaengeb2.Visible := true;
aDEdLaengec2.Visible := true;
aDEdUmfang2.Visible := true;
aDEdFlaeche2.Visible := true;
aDLbDreieck1.Visible := true;
aDLbDreieck2.Visible := true;
end;
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
except
on EInvalidOp
do begin MessageDlg('
Dreieck nicht lösbar!', mtWarning, [mbOK], 0);
aDEdAlpha.Text := '
';
aDEdBeta.Text := '
';
aDEdGamma.Text := '
Error!';
aDEdLaengea.Text := '
';
aDEdLaengeb.Text := '
';
aDEdLaengec.Text := '
';
aDEdUmfang.Text := '
';
aDEdFlaeche.Text := '
';
end
end;
end
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
beta := StrToFloat(aDEdBeta.Text);
gamma := StrToFloat(aDEdGamma.Text);
a := StrToFloat(aDEdLaengea.Text);
alpha := 180-beta-gamma;
b := a*sin(DegtoRad(beta))/sin(DegtoRad(alpha));
c := sqrt(a*a + b*b - 2*a*b*cos(DegtoRad(gamma)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
aDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if aDEdLaengeb.Text > '
0'
then
begin
try
beta := StrToFloat(aDEdBeta.Text);
a := StrToFloat(aDEdLaengea.Text);
b := StrToFloat(aDEdLaengeb.Text);
alpha := RadtoDeg(arcsin(sin(DegtoRad(beta))*a/b));
// !!
gamma := 180-alpha-beta;
c := sqrt(a*a + b*b - 2*a*b*cos(DegtoRad(gamma)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
alpha2 := 90+(90-alpha);
if alpha2 > alpha
then
begin
ShowMessage('
Dreieck mehrdeutig, 2 Lösungen vorhanden.');
gamma2 := 180-alpha2-beta;
c2 := sqrt(a*a + b*b - 2*a*b*cos(DegtoRad(gamma2)));
u2 := a+b+c2;
s2 := u2/2;
Area2 := sqrt(s2*(s2-a)*(s2-b)*(s2-c2));
aDEdAlpha2.Text := FloatToStrF(alpha2,ffFixed,10,2)+ '
°';
aDEdBeta2.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma2.Text := FloatToStrF(gamma2,ffFixed,10,2)+ '
°';
aDEdLaengea2.Text := FloatToStr(a);
aDEdLaengeb2.Text := FloatToStr(b);
aDEdLaengec2.Text := FloatToStrF(c2,ffFixed,10,3);
aDEdUmfang2.Text := FloatToStrF(u2,ffFixed,10,3);
aDEdFlaeche2.Text := FloatToStrF(Area2,ffFixed,10,2);
aDEdAlpha.Width := 85;
aDEdBeta.Width := 85;
aDEdGamma.Width := 85;
aDEdLaengea.Width := 85;
aDEdLaengeb.Width := 85;
aDEdLaengec.Width := 85;
aDEdUmfang.Width := 85;
aDEdFlaeche.Width := 85;
aDEdAlpha2.Visible := true;
aDEdBeta2.Visible := true;
aDEdGamma2.Visible := true;
aDEdLaengea2.Visible := true;
aDEdLaengeb2.Visible := true;
aDEdLaengec2.Visible := true;
aDEdUmfang2.Visible := true;
aDEdFlaeche2.Visible := true;
aDLbDreieck1.Visible := true;
aDLbDreieck2.Visible := true;
end;
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
except
on EInvalidOp
do begin MessageDlg('
Dreieck nicht lösbar!', mtWarning, [mbOK], 0);
aDEdAlpha.Text := '
Error!';
aDEdBeta.Text := '
';
aDEdGamma.Text := '
';
aDEdLaengea.Text := '
';
aDEdLaengeb.Text := '
';
aDEdLaengec.Text := '
';
aDEdUmfang.Text := '
';
aDEdFlaeche.Text := '
';
end
end;
end else
if aDEdLaengec.Text > '
0'
then
begin
beta := StrToFloat(aDEdBeta.Text);
a := StrToFloat(aDEdLaengea.Text);
c := StrToFloat(aDEdLaengec.Text);
b := sqrt(a*a + c*c - 2*a*c*cos(DegtoRad(beta)));
alpha := RadtoDeg(arccos((b*b+c*c-a*a)/(2*b*c)));
gamma := 180-alpha-beta;
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2);
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2);
aDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end
end else
if aDEdGamma.Text > '
0'
then
begin
if aDEdLaengeb.Text > '
0'
then
begin
gamma := StrToFloat(aDEdGamma.Text);
a := StrToFloat(aDEdLaengea.Text);
b := StrToFloat(aDEdLaengeb.Text);
c := sqrt(a*a + b*b - 2*a*b*cos(DegtoRad(gamma)));
alpha := RadtoDeg(arccos((b*b+c*c-a*a)/(2*b*c)));
beta := 180-alpha-gamma;
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if aDEdLaengec.Text > '
0'
then
begin
try
gamma := StrToFloat(aDEdGamma.Text);
a := StrToFloat(aDEdLaengea.Text);
c := StrToFloat(aDEdLaengec.Text);
alpha := RadtoDeg(arcsin(sin(DegtoRad(Gamma))*a/c));
// !!
beta := 180-alpha-gamma;
b := sqrt(a*a + c*c - 2*a*c*cos(DegtoRad(beta)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
alpha2 := 90+(90-alpha);
if alpha2 > alpha
then
begin
ShowMessage('
Dreieck mehrdeutig, 2 Lösungen vorhanden.');
beta2 := 180-alpha2-gamma;
b2 := sqrt(a*a + c*c - 2*a*c*cos(DegtoRad(beta2)));
u2 := a+b2+c;
s2 := u2/2;
Area2 := sqrt(s2*(s2-a)*(s2-b2)*(s2-c));
aDEdAlpha2.Text := FloatToStrF(alpha2,ffFixed,10,2)+ '
°';
aDEdBeta2.Text := FloatToStrF(beta2,ffFixed,10,2)+ '
°';
aDEdGamma2.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdLaengea2.Text := FloatToStr(a);
aDEdLaengeb2.Text := FloatToStrF(b2,ffFixed,10,3);
aDEdLaengec2.Text := FloatToStr(c);
aDEdUmfang2.Text := FloatToStrF(u2,ffFixed,10,3);
aDEdFlaeche2.Text := FloatToStrF(Area2,ffFixed,10,2);
aDEdAlpha.Width := 85;
aDEdBeta.Width := 85;
aDEdGamma.Width := 85;
aDEdLaengea.Width := 85;
aDEdLaengeb.Width := 85;
aDEdLaengec.Width := 85;
aDEdUmfang.Width := 85;
aDEdFlaeche.Width := 85;
aDEdAlpha2.Visible := true;
aDEdBeta2.Visible := true;
aDEdGamma2.Visible := true;
aDEdLaengea2.Visible := true;
aDEdLaengeb2.Visible := true;
aDEdLaengec2.Visible := true;
aDEdUmfang2.Visible := true;
aDEdFlaeche2.Visible := true;
aDLbDreieck1.Visible := true;
aDLbDreieck2.Visible := true;
end;
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
except
on EInvalidOp
do begin MessageDlg('
Dreieck nicht lösbar!', mtWarning, [mbOK], 0);
aDEdAlpha.Text := '
Error!';
aDEdBeta.Text := '
';
aDEdGamma.Text := '
';
aDEdLaengea.Text := '
';
aDEdLaengeb.Text := '
';
aDEdLaengec.Text := '
';
aDEdUmfang.Text := '
';
aDEdFlaeche.Text := '
';
end
end;
end
end else
if aDEdLaengeb.Text > '
0'
then
begin
if aDEdLaengec.Text > '
0'
then
begin
try
a := StrToFloat(aDEdLaengea.Text);
b := StrToFloat(aDEdLaengeb.Text);
c := StrToFloat(aDEdLaengec.Text);
alpha := RadtoDeg(arccos((b*b+c*c-a*a)/(2*b*c)));
beta := RadtoDeg(arccos((a*a+c*c-b*b)/(2*a*c)));
gamma := 180-alpha-beta;
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
except
on EInvalidOp
do begin MessageDlg('
Fehler!' + #13 + '
Eine Seite muss mindestens so lang sein wie die Summe der anderen beiden.', mtWarning, [mbOK], 0);
aDEdAlpha.Text := '
';
aDEdBeta.Text := '
';
aDEdGamma.Text := '
';
aDEdLaengea.Text := '
Error!';
aDEdLaengeb.Text := '
Error!';
aDEdLaengec.Text := '
Error!';
aDEdUmfang.Text := '
';
aDEdFlaeche.Text := '
';
end
end;
end
end
end else
if aDEdLaengeb.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
alpha := StrToFloat(aDEdAlpha.Text);
beta := StrToFloat(aDEdBeta.Text);
b := StrToFloat(aDEdLaengeb.Text);
gamma := 180-alpha-beta;
a := b*Sin(DegtoRad(alpha))/Sin(DegtoRad(beta));
c := sqrt(a*a + b*b - 2*a*b*cos(DegtoRad(gamma)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
aDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if aDEdGamma.Text > '
0'
then
begin
alpha := StrToFloat(aDEdAlpha.Text);
gamma := StrToFloat(aDEdGamma.Text);
b := StrToFloat(aDEdLaengeb.Text);
beta := 180-alpha-gamma;
a := b*Sin(DegtoRad(alpha))/Sin(DegtoRad(beta));
c := sqrt(a*a + b*b - 2*a*b*cos(DegtoRad(gamma)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
aDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if aDEdLaengec.Text > '
0'
then
begin
alpha := StrToFloat(aDEdAlpha.Text);
b := StrToFloat(aDEdLaengeb.Text);
c := StrToFloat(aDEdLaengec.Text);
a := sqrt(b*b + c*c - 2*b*c*cos(DegtoRad(alpha)));
beta := RadtoDeg(arccos((a*a+c*c-b*b)/(2*a*c)));
gamma := 180-alpha-beta;
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
beta := StrToFloat(aDEdBeta.Text);
b := StrToFloat(aDEdLaengeb.Text);
gamma := StrToFloat(aDEdGamma.Text);
alpha := 180-beta-gamma;
a := b*Sin(DegtoRad(alpha))/Sin(DegtoRad(beta));
c := sqrt(a*a + b*b - 2*a*b*cos(DegtoRad(gamma)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
aDEdLaengec.Text := FloatToStrF(c,ffFixed,10,3);
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if aDEdLaengec.Text > '
0'
then
begin
try
beta := StrToFloat(aDEdBeta.Text);
b := StrToFloat(aDEdLaengeb.Text);
c := StrToFloat(aDEdLaengec.Text);
gamma := RadtoDeg(arcsin(sin(DegtoRad(beta))*c/b));
// !!
alpha := 180-beta-gamma;
a := sqrt(b*b + c*c - 2*b*c*cos(DegtoRad(alpha)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
gamma2 := 90+(90-gamma);
if gamma2 > gamma
then
begin
ShowMessage('
Dreieck mehrdeutig, 2 Lösungen vorhanden.');
alpha2 := 180-beta-gamma2;
a2 := sqrt(b*b + c*c - 2*b*c*cos(DegtoRad(alpha2)));
u2 := a2+b+c;
s2 := u2/2;
Area2 := sqrt(s2*(s2-a2)*(s2-b)*(s2-c));
aDEdAlpha2.Text := FloatToStrF(alpha2,ffFixed,10,2)+ '
°';
aDEdBeta2.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma2.Text := FloatToStrF(gamma2,ffFixed,10,2)+ '
°';
aDEdLaengea2.Text := FloatToStrF(a2,ffFixed,10,3);
aDEdLaengeb2.Text := FloatToStr(b);
aDEdLaengec2.Text := FloatToStr(c);
aDEdUmfang2.Text := FloatToStrF(u2,ffFixed,10,3);
aDEdFlaeche2.Text := FloatToStrF(Area2,ffFixed,10,2);
aDEdAlpha.Width := 85;
aDEdBeta.Width := 85;
aDEdGamma.Width := 85;
aDEdLaengea.Width := 85;
aDEdLaengeb.Width := 85;
aDEdLaengec.Width := 85;
aDEdUmfang.Width := 85;
aDEdFlaeche.Width := 85;
aDEdAlpha2.Visible := true;
aDEdBeta2.Visible := true;
aDEdGamma2.Visible := true;
aDEdLaengea2.Visible := true;
aDEdLaengeb2.Visible := true;
aDEdLaengec2.Visible := true;
aDEdUmfang2.Visible := true;
aDEdFlaeche2.Visible := true;
aDLbDreieck1.Visible := true;
aDLbDreieck2.Visible := true;
end;
aDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
except
on EInvalidOp
do begin MessageDlg('
Dreieck nicht lösbar!', mtWarning, [mbOK], 0);
aDEdAlpha.Text := '
';
aDEdBeta.Text := '
';
aDEdGamma.Text := '
Error!';
aDEdLaengea.Text := '
';
aDEdLaengeb.Text := '
';
aDEdLaengec.Text := '
';
aDEdUmfang.Text := '
';
aDEdFlaeche.Text := '
';
end
end;
end
end else
if aDEdGamma.Text > '
0'
then
begin
if aDEdLaengec.Text > '
0'
then
begin
try
gamma := StrToFloat(aDEdGamma.Text);
b := StrToFloat(aDEdLaengeb.Text);
c := StrToFloat(aDEdLaengec.Text);
beta := RadtoDeg(arcsin(sin(DegtoRad(gamma))*b/c));
// !!
alpha := 180-beta-gamma;
a := sqrt(b*b + c*c - 2*b*c*cos(DegtoRad(alpha)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
beta2 := 90+(90-beta);
if beta2 > beta
then
begin
ShowMessage('
Dreieck mehrdeutig, 2 Lösungen vorhanden.');
alpha2 := 180-beta2-gamma;
a2 := sqrt(b*b + c*c - 2*b*c*cos(DegtoRad(alpha2)));
u2 := a2+b+c;
s2 := u2/2;
Area2 := sqrt(s2*(s2-a2)*(s2-b)*(s2-c));
aDEdAlpha2.Text := FloatToStrF(alpha2,ffFixed,10,2)+ '
°';
aDEdBeta2.Text := FloatToStrF(beta2,ffFixed,10,2)+ '
°';
aDEdGamma2.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdLaengea2.Text := FloatToStrF(a2,ffFixed,10,3);
aDEdLaengeb2.Text := FloatToStr(b);
aDEdLaengec2.Text := FloatToStr(c);
aDEdUmfang2.Text := FloatToStrF(u2,ffFixed,10,3);
aDEdFlaeche2.Text := FloatToStrF(Area2,ffFixed,10,2);
aDEdAlpha.Width := 85;
aDEdBeta.Width := 85;
aDEdGamma.Width := 85;
aDEdLaengea.Width := 85;
aDEdLaengeb.Width := 85;
aDEdLaengec.Width := 85;
aDEdUmfang.Width := 85;
aDEdFlaeche.Width := 85;
aDEdAlpha2.Visible := true;
aDEdBeta2.Visible := true;
aDEdGamma2.Visible := true;
aDEdLaengea2.Visible := true;
aDEdLaengeb2.Visible := true;
aDEdLaengec2.Visible := true;
aDEdUmfang2.Visible := true;
aDEdFlaeche2.Visible := true;
aDLbDreieck1.Visible := true;
aDLbDreieck2.Visible := true;
end;
aDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
except
on EInvalidOp
do begin MessageDlg('
Dreieck nicht lösbar!', mtWarning, [mbOK], 0);
aDEdAlpha.Text := '
';
aDEdBeta.Text := '
Error!';
aDEdGamma.Text := '
';
aDEdLaengea.Text := '
';
aDEdLaengeb.Text := '
';
aDEdLaengec.Text := '
';
aDEdUmfang.Text := '
';
aDEdFlaeche.Text := '
';
end
end;
end
end
end else
if aDEdLaengec.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
alpha := StrToFloat(aDEdAlpha.Text);
beta := StrToFloat(aDEdBeta.Text);
c := StrToFloat(aDEdLaengec.Text);
gamma := 180-alpha-beta;
a := c*Sin(DegtoRad(alpha))/Sin(DegtoRad(gamma));
b := sqrt(a*a + c*c - 2*a*c*cos(DegtoRad(beta)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
aDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end else
if aDEdGamma.Text > '
0'
then
begin
alpha := StrToFloat(aDEdAlpha.Text);
gamma := StrToFloat(aDEdGamma.Text);
c := StrToFloat(aDEdLaengec.Text);
beta := 180-alpha-gamma;
a := c*Sin(DegtoRad(alpha))/Sin(DegtoRad(gamma));
b := sqrt(a*a + c*c - 2*a*c*cos(DegtoRad(beta)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
aDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
beta := StrToFloat(aDEdBeta.Text);
c := StrToFloat(aDEdLaengec.Text);
gamma := StrToFloat(aDEdGamma.Text);
alpha := 180-beta-gamma;
a := c*Sin(DegtoRad(alpha))/Sin(DegtoRad(gamma));
b := sqrt(a*a + c*c - 2*a*c*cos(DegtoRad(beta)));
u := a+b+c;
s := u/2;
Area := sqrt(s*(s-a)*(s-b)*(s-c));
aDEdLaengea.Text := FloatToStrF(a,ffFixed,10,3);
aDEdLaengeb.Text := FloatToStrF(b,ffFixed,10,3);
aDEdAlpha.Text := FloatToStrF(alpha,ffFixed,10,2)+ '
°';
aDEdBeta.Text := FloatToStrF(beta,ffFixed,10,2)+ '
°';
aDEdGamma.Text := FloatToStrF(gamma,ffFixed,10,2)+ '
°';
aDEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
aDEdFlaeche.Text := FloatToStrF(Area,ffFixed,10,2);
end
end
end;
aDEdAlpha.
ReadOnly := true;
aDEdBeta.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
aDBtRechnen.Enabled := false;
end;
procedure TForm1.aDBtLoeschenClick(Sender: TObject);
begin
aDEdAlpha.Text := '
0';
aDEdBeta.Text := '
0';
aDEdGamma.Text := '
0';
aDEdLaengea.Text := '
0';
aDEdLaengeb.Text := '
0';
aDEdLaengec.Text := '
0';
aDEdUmfang.Text := '
0';
aDEdFlaeche.Text := '
0';
aDEdAlpha2.Text := '
0';
aDEdBeta2.Text := '
0';
aDEdGamma2.Text := '
0';
aDEdLaengea2.Text := '
0';
aDEdLaengeb2.Text := '
0';
aDEdLaengec2.Text := '
0';
aDEdUmfang2.Text := '
0';
aDEdFlaeche2.Text := '
0';
aDEdAlpha.
ReadOnly := false;
aDEdBeta.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
aDBtRechnen.Enabled := true;
aDLbDreieck1.Visible := false;
aDLbDreieck2.Visible := false;
aDEdAlpha2.Visible := false;
aDEdBeta2.Visible := false;
aDEdGamma2.Visible := false;
aDEdLaengea2.Visible := false;
aDEdLaengeb2.Visible := false;
aDEdLaengec2.Visible := false;
aDEdUmfang2.Visible := false;
aDEdFlaeche2.Visible := false;
aDEdAlpha.Width := 177;
aDEdBeta.Width := 177;
aDEdGamma.Width := 177;
aDEdLaengea.Width := 177;
aDEdLaengeb.Width := 177;
aDEdLaengec.Width := 177;
aDEdUmfang.Width := 177;
aDEdFlaeche.Width := 177;
end;
//SPERRLISTE FÜR EDITFELDER
(*----------------------------------Körper----------------------------------*)
(*_____Würfel_____*)
procedure TForm1.WBtRechnenClick(Sender: TObject);
var a,d,k,O,V :real;
begin
if WEdKanten.Text > '
0'
then
begin
a := StrToFloat(WEdKanten.Text);
d := a*sqrt(3);
k := 12*a;
O := 6 * (a*a);
V := a*a*a;
WEdDiagonale.Text := FloatToStrF(d,ffFixed,10,3);
WEdGesamtkanten.Text := FloatToStrF(k,ffFixed,10,3);
WEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
WEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
end else
if WEdDiagonale.Text > '
0'
then
begin
d := StrToFloat(WEdDiagonale.Text);
a := sqrt((d*d)/3);
k := 12*a;
O := 6 * (a*a);
V := a*a*a;
WEdKanten.Text := FloatToStrF(a,ffFixed,10,3);
WEdGesamtkanten.Text := FloatToStrF(k,ffFixed,10,3);
WEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
WEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
end else
if WEdGesamtkanten.Text > '
0'
then
begin
k := StrToFloat(WEdGesamtkanten.Text);
a := k/12;
d := a*sqrt(3);
O := 6*(a*a);
V := a*a*a;
WEdKanten.Text := FloatToStrF(a,ffFixed,10,3);
WEdDiagonale.Text := FloatToStrF(d,ffFixed,10,3);
WEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
WEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
end;
WEdKanten.
ReadOnly := true;
WEdDiagonale.
ReadOnly := true;
WEdGesamtkanten.
ReadOnly := true;
WBtRechnen.Enabled := false;
end;
procedure TForm1.WBtLoeschenClick(Sender: TObject);
begin
WEdKanten.Text := '
0';
WEdDiagonale.Text := '
0';
WEdGesamtkanten.Text := '
0';
WEdOberflaeche.Text := '
0';
WEdVolumen.Text := '
0';
WEdKanten.
ReadOnly := false;
WEdDiagonale.
ReadOnly := false;
WEdGesamtkanten.
ReadOnly := false;
WBtRechnen.Enabled := true;
end;
procedure TForm1.WEdKantenChange(Sender: TObject);
begin
if WEdKanten.Text > '
0'
then
begin
WEdDiagonale.
ReadOnly := true;
WEdGesamtkanten.
ReadOnly := true;
end else
begin
WEdDiagonale.
ReadOnly := false;
WEdGesamtkanten.
ReadOnly := false;
end;
end;
procedure TForm1.WEdDiagonaleChange(Sender: TObject);
begin
if WEdDiagonale.Text > '
0'
then
begin
WEdKanten.
ReadOnly := true;
WEdGesamtkanten.
ReadOnly := true;
end else
begin
WEdKanten.
ReadOnly := false;
WEdGesamtkanten.
ReadOnly := false;
end;
end;
procedure TForm1.WEdGesamtkantenChange(Sender: TObject);
begin
if WEdGesamtkanten.Text > '
0'
then
begin
WEdKanten.
ReadOnly := true;
WEdDiagonale.
ReadOnly := true;
end else
begin
WEdKanten.
ReadOnly := false;
WEdDiagonale.
ReadOnly := false;
end;
end;
(*_____Quader_____*)
procedure TForm1.QuBtRechnenClick(Sender: TObject);
var a,b,c,d,k,O,V :real;
begin
if QuEdKantea.Text > '
0'
then
if QuEdKanteb.Text > '
0'
then
if QuEdKantec.Text > '
0'
then
begin
a := StrToFloat(QuEdKantea.Text);
b := StrToFloat(QuEdKanteb.Text);
c := StrToFloat(QuEdKantec.Text);
d := sqrt(a*a + b*b + c*c);
k := 4*(a+b+c);
O := 2*(a*b + b*c + a*c);
V := a*b*c;
QuEdDiagonale.Text := FloatToStrF(d,ffFixed,10,3);
QuEdGesamtkanten.Text := FloatToStr(k);
QuEdOberflaeche.Text := FloatToStr(O);
QuEdVolumen.Text := FloatToStr(V);
QuEdKantea.
ReadOnly := true;
QuEdKanteb.
ReadOnly := true;
QuEdKantec.
ReadOnly := true;
QuBtRechnen.Enabled := false;
end;
end;
procedure TForm1.QuBtLoeschenClick(Sender: TObject);
begin
QuEdKantea.Text := '
0';
QuEdKanteb.Text := '
0';
QuEdKantec.Text := '
0';
QuEdDiagonale.Text := '
0';
QuEdGesamtkanten.Text := '
0';
QuEdOberflaeche.Text := '
0';
QuEdVolumen.Text := '
0';
QuEdKantea.
ReadOnly := false;
QuEdKanteb.
ReadOnly := false;
QuEdKantec.
ReadOnly := false;
QuBtRechnen.Enabled := true;
end;
(*_____Kugel_____*)
procedure TForm1.KuBtRechnenClick(Sender: TObject);
var r,d,O,V :real;
begin
if KuEdRadius.Text > '
0'
then
begin
r := StrToFloat(KuEdRadius.Text);
d := 2*r;
O := pi*d*d;
V := 4*pi*(r*r*r)/3;
KuEdDurchmesser.Text := FloatToStr(d);
KuEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
KuEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
end else
if KuEdDurchmesser.Text > '
0'
then
begin
d := StrToFloat(KuEdDurchmesser.Text);
r := d/2;
O := pi*d*d;
V := 4*pi*(r*r*r)/3;
KuEdRadius.Text := FloatToStr(r);
KuEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
KuEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
end;
KuEdRadius.
ReadOnly := true;
KuEdDurchmesser.
ReadOnly := true;
KuBtRechnen.Enabled := false;
end;
procedure TForm1.KuBtLoeschenClick(Sender: TObject);
begin
KuEdRadius.Text := '
0';
KuEdDurchmesser.Text := '
0';
KuEdOberflaeche.Text := '
0';
KuEdVolumen.Text := '
0';
KuEdRadius.
ReadOnly := false;
KuEdDurchmesser.
ReadOnly := false;
KuBtRechnen.Enabled := true;
end;
procedure TForm1.KuEdRadiusChange(Sender: TObject);
begin
if KuEdRadius.Text > '
0'
then
KuEdDurchmesser.
ReadOnly := true
else
KuEdDurchmesser.
ReadOnly := false;
end;
procedure TForm1.KuEdDurchmesserChange(Sender: TObject);
begin
if KuEdDurchmesser.Text > '
0'
then
KuEdRadius.
ReadOnly := true
else
KuEdRadius.
ReadOnly := false;
end;
(*_____Zylinder_____*)
procedure TForm1.ZBtRechnenClick(Sender: TObject);
var r,h,u,O,V,M,A :real;
begin
if ZEdRadius.Text > '
0'
then
begin
r := StrToFloat(ZEdRadius.Text);
h := StrToFloat(ZEdHoehe.Text);
u := 2*Pi*r;
O := 2*Pi*r*(h+r);
V := Pi*r*r*h;
M := 2*Pi*r*h;
A := 2*(Pi*r*r);
ZEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
ZEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
ZEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
ZEdMantel.Text := FloatToStrF(M,ffFixed,10,2);
ZEdGrundflaechen.Text := FloatToStrF(A,ffFixed,10,2);
end else
if ZEdUmfang.Text > '
0'
then
begin
u := StrToFloat(ZEdUmfang.Text);
h := StrToFloat(ZEdHoehe.Text);
r := u/(2*pi);
O := 2*Pi*r*(h+r);
V := Pi*r*r*h;
M := 2*Pi*r*h;
A := 2*(Pi*r*r);
ZEdRadius.Text := FloatToStrF(r,ffFixed,10,3);
ZEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
ZEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
ZEdMantel.Text := FloatToStrF(M,ffFixed,10,2);
ZEdGrundflaechen.Text := FloatToStrF(A,ffFixed,10,2);
end;
ZEdRadius.
ReadOnly := true;
ZEdHoehe.
ReadOnly := true;
ZEdUmfang.
ReadOnly := true;
ZBtRechnen.Enabled := false;
end;
procedure TForm1.ZBtLoeschenClick(Sender: TObject);
begin
ZEdRadius.Text := '
0';
ZEdHoehe.Text := '
0';
ZEDUmfang.Text := '
0';
ZEdOberflaeche.Text := '
0';
ZEdVolumen.Text := '
0';
ZEdMantel.Text := '
0';
ZEdGrundflaechen.Text := '
0';
ZEdRadius.
ReadOnly := false;
ZEdHoehe.
ReadOnly := false;
ZEdUmfang.
ReadOnly := false;
ZBtRechnen.Enabled := true;
end;
procedure TForm1.ZEdRadiusChange(Sender: TObject);
begin
if ZEdRadius.Text > '
0'
then
ZEdUmfang.
ReadOnly := true
else
ZEdUmfang.
ReadOnly := false;
end;
procedure TForm1.ZEdUmfangChange(Sender: TObject);
begin
if ZEdUmfang.Text > '
0'
then
ZEdRadius.
ReadOnly := true
else
ZEdRadius.
ReadOnly := false;
end;
(*_____Kegel_____*)
procedure TForm1.KeBtRechnenClick(Sender: TObject);
var r,h,u,s,O,V,M,A :real;
begin
if KeEdRadius.Text > '
0'
then
begin
if KeEdHoehe.Text > '
0'
then
begin
r := StrToFloat(KeEdRadius.Text);
h := StrToFloat(KeEdHoehe.Text);
u := 2*Pi*r;
s := sqrt(r*r+h*h);
O := pi*r*(r+s);
V := Pi*r*r*h/3;
M := pi*s*r;
A := pi*r*r;
KeEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
KeEdMantellinie.Text := FloatToStrF(s,ffFixed,10,2);
KeEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
KeEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
KeEdMantel.Text := FloatToStrF(M,ffFixed,10,2);
KeEdGrundflaeche.Text := FloatToStrF(A,ffFixed,10,2);
end else
if KeEdMantellinie.Text > '
0'
then
begin
r := StrToFloat(KeEdRadius.Text);
s := StrToFloat(KeEdMantellinie.Text);
u := 2*Pi*r;
h := sqrt(s*s-r*r);
O := pi*r*(r+s);
V := Pi*r*r*h/3;
M := pi*s*r;
A := pi*r*r;
KeEdUmfang.Text := FloatToStrF(u,ffFixed,10,3);
KeEdHoehe.Text := FloatToStrF(h,ffFixed,10,2);
KeEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
KeEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
KeEdMantel.Text := FloatToStrF(M,ffFixed,10,2);
KeEdGrundflaeche.Text := FloatToStrF(A,ffFixed,10,2);
end;
end else
if KeEdUmfang.Text > '
0'
then
begin
if KeEdHoehe.Text > '
0'
then
begin
u := StrToFloat(KeEdUmfang.Text);
h := StrToFloat(KeEdHoehe.Text);
r := u/(2*Pi);
s := sqrt(r*r+h*h);
O := pi*r*(r+s);
V := Pi*r*r*h/3;
M := pi*s*r;
A := pi*r*r;
KeEdRadius.Text := FloatToStrF(r,ffFixed,10,3);
KeEdMantellinie.Text := FloatToStrF(s,ffFixed,10,2);
KeEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
KeEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
KeEdMantel.Text := FloatToStrF(M,ffFixed,10,2);
KeEdGrundflaeche.Text := FloatToStrF(A,ffFixed,10,2);
end else
if KeEdMantellinie.Text > '
0'
then
begin
u := StrToFloat(KeEdUmfang.Text);
s := StrToFloat(KeEdMantellinie.Text);
r := u/(2*Pi);
h := sqrt(s*s-r*r);
O := pi*r*(r+s);
V := Pi*r*r*h/3;
M := pi*s*r;
A := pi*r*r;
KeEdRadius.Text := FloatToStrF(r,ffFixed,10,3);
KeEdHoehe.Text := FloatToStrF(h,ffFixed,10,2);
KeEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
KeEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
KeEdMantel.Text := FloatToStrF(M,ffFixed,10,2);
KeEdGrundflaeche.Text := FloatToStrF(A,ffFixed,10,2);
end;
end;
KeEdRadius.
ReadOnly := true;
KeEdHoehe.
ReadOnly := true;
KeEdUmfang.
ReadOnly := true;
KeEdMantellinie.
ReadOnly := true;
KeBtRechnen.Enabled := false;
end;
procedure TForm1.KeBtLoeschenClick(Sender: TObject);
begin
KeEdRadius.Text := '
0';
KeEdHoehe.Text := '
0';
KeEdUmfang.Text := '
0';
KeEdMantellinie.Text := '
0';
KeEdOberflaeche.Text := '
0';
KeEdVolumen.Text := '
0';
KeEdMantel.Text := '
0';
KeEdGrundflaeche.Text := '
0';
KeEdRadius.
ReadOnly := false;
KeEdHoehe.
ReadOnly := false;
KeEdUmfang.
ReadOnly := false;
KeEdMantellinie.
ReadOnly := false;
KeBtRechnen.Enabled := true;
end;
procedure TForm1.KeEdRadiusChange(Sender: TObject);
begin
if KeEdRadius.Text > '
0'
then
KeEdUmfang.
ReadOnly := true
else
KeEdUmfang.
ReadOnly := false;
end;
procedure TForm1.KeEdHoeheChange(Sender: TObject);
begin
if KeEdHoehe.Text > '
0'
then
KeEdMantellinie.
ReadOnly := true
else
KeEdMantellinie.
ReadOnly := false;
end;
procedure TForm1.KeEdUmfangChange(Sender: TObject);
begin
if KeEdUmfang.Text > '
0'
then
KeEdRadius.
ReadOnly := true
else
KeEdRadius.
ReadOnly := false;
end;
procedure TForm1.KeEdMantellinieChange(Sender: TObject);
begin
if KeEdMantellinie.Text > '
0'
then
KeEdHoehe.
ReadOnly := true
else
KeEdHoehe.
ReadOnly := false;
end;
(*_____Pyramide_____*)
procedure TForm1.PBtRechnenClick(Sender: TObject);
var a,h,s,O,V,M,G :real;
d,hs,x :real;
begin
if PEdKantenlaenge.Text > '
0'
then
begin
if PEdHoehe.Text > '
0'
then
begin
a := StrToFloat(PEdKantenlaenge.Text);
h := StrToFloat(PEdHoehe.Text);
d := a*sqrt(2);
s := sqrt(h*h+(d/2)*(d/2));
hs := sqrt(h*h+(a/2)*(a/2));
O := a*a+2*a*hs;
V := (1/3)*a*a*h;
G := a*a;
M := O - G;
PEdSeitenkante.Text := FloatToStrF(s,ffFixed,10,2);
PEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
PEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
PEdMantel.Text := FloatToStrF(M,ffFixed,10,2);
PEdGrundflaeche.Text := FloatToStrF(G,ffFixed,10,2);
end else
if PEdSeitenkante.Text > '
0'
then
begin
try
a := StrToFloat(PEdKantenlaenge.Text);
s := StrToFloat(PEdSeitenkante.Text);
d := a*sqrt(2);
h := sqrt(s*s-(d/2)*(d/2));
hs := sqrt(h*h+(a/2)*(a/2));
O := a*a+2*a*hs;
V := (1/3)*a*a*h;
G := a*a;
M := O - G;
PEdHoehe.Text := FloatToStrF(h,ffFixed,10,2);
PEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
PEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
PEdMantel.Text := FloatToStrF(M,ffFixed,10,2);
PEdGrundflaeche.Text := FloatToStrF(G,ffFixed,10,2);
PEdKantenlaenge.
ReadOnly := true;
PEdHoehe.
ReadOnly := true;
PEdSeitenkante.
ReadOnly := true;
PBtRechnen.Enabled := false;
except
on EInvalidOp
do begin x := (a*sqrt(2))/2;
MessageDlg('
Berechnung nicht möglich!' +#13+ '
Bitte als Seitenkantenlänge min. ' + FloatToStr(x) + '
nehmen', mtWarning, [mbOK], 0);
PEdKantenlaenge.
ReadOnly := false;
PEdSeitenkante.
ReadOnly := false;
PEdSeitenkante.Text := FloatToStr(x);
end
end;
end;
end;
end;
procedure TForm1.PBtLoeschenClick(Sender: TObject);
begin
PEdKantenlaenge.Text := '
0';
PEdHoehe.Text := '
0';
PEdSeitenkante.Text := '
0';
PEdOberflaeche.Text := '
0';
PEdVolumen.Text := '
0';
PEdMantel.Text := '
0';
PEdGrundflaeche.Text := '
0';
PEdKantenlaenge.
ReadOnly := false;
PEdHoehe.
ReadOnly := false;
PEdSeitenkante.
ReadOnly := false;
PBtRechnen.Enabled := true;
end;
procedure TForm1.PEdHoeheChange(Sender: TObject);
begin
if PEdHoehe.Text > '
0'
then
PEdSeitenkante.
ReadOnly := true
else
PEdSeitenkante.
ReadOnly := false;
end;
procedure TForm1.PEdSeitenkanteChange(Sender: TObject);
begin
if PEdSeitenkante.Text > '
0'
then
PEdHoehe.
ReadOnly := true
else
PEdHoehe.
ReadOnly := false;
end;
(*_____Tetraeder_____*)
procedure TForm1.TBtRechnenClick(Sender: TObject);
var a,h,O,V,M,G :real;
begin
if TEdKantenlaenge.Text > '
0'
then
begin
a := StrToFloat(TEdKantenlaenge.Text);
h := sqrt(2/3)*a;
O := a*a*sqrt(3);
V := a*a*a/12*sqrt(2);
G := O/4;
M := O-G;
TEdHoehe.Text := FloatToStrF(h,ffFixed,10,2);
TEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
TEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
TEdMantel.Text := FloatToStrF(M,ffFixed,10,2);
TEdGrundflaeche.Text := FloatToStrF(G,ffFixed,10,2);
end else
if TEdHoehe.Text > '
0'
then
begin
h := StrToFloat(TEdHoehe.Text);
a := sqrt(3/2)*h;
O := a*a*sqrt(3);
V := a*a*a/12*sqrt(2);
G := O/4;
M := O-G;
TEdKantenlaenge.Text := FloatToStrF(a,ffFixed,10,2);
TEdOberflaeche.Text := FloatToStrF(O,ffFixed,10,3);
TEdVolumen.Text := FloatToStrF(V,ffFixed,10,2);
TEdMantel.Text := FloatToStrF(M,ffFixed,10,2);
TEdGrundflaeche.Text := FloatToStrF(G,ffFixed,10,2);
end;
TEdKantenlaenge.
ReadOnly := true;
TEdHoehe.
ReadOnly := true;
TBtRechnen.Enabled := false;
end;
procedure TForm1.TBtLoeschenClick(Sender: TObject);
begin
TEdKantenlaenge.Text := '
0';
TEdHoehe.Text := '
0';
TEdOberflaeche.Text := '
0';
TEdVolumen.Text := '
0';
TEdMantel.Text := '
0';
TEdGrundflaeche.Text := '
0';
TEdKantenlaenge.
ReadOnly := false;
TEdHoehe.
ReadOnly := false;
TBtRechnen.Enabled := true;
end;
procedure TForm1.TEdKantenlaengeChange(Sender: TObject);
begin
if TEdKantenlaenge.Text > '
0'
then
TEdHoehe.
ReadOnly := true
else
TEdHoehe.
ReadOnly := false;
end;
procedure TForm1.TEdHoeheChange(Sender: TObject);
begin
if TEdHoehe.Text > '
0'
then
TEdKantenlaenge.
ReadOnly := true
else
TEdKantenlaenge.
ReadOnly := false;
end;
procedure TForm1.aDEdAlphaChange(Sender: TObject);
begin
if aDEdLaengea.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
aDEdGamma.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdGamma.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdGamma.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengeb.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengec.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end;
end else
if aDEdLaengeb.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
aDEdGamma.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdGamma.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdGamma.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengec.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
end
end;
end else
if aDEdLaengec.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
aDEdGamma.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdGamma.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end;
if aDEdGamma.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end;
end;
end;
procedure TForm1.aDEdBetaChange(Sender: TObject);
begin
if aDEdLaengea.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
aDEdGamma.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdGamma.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengeb.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end;
end else
if aDEdLaengeb.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
aDEdGamma.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdGamma.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
end
end;
end else
if aDEdLaengec.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
aDEdGamma.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdGamma.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end;
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end;
end;
end;
procedure TForm1.aDEdGammaChange(Sender: TObject);
begin
if aDEdLaengea.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
end else
if aDEdGamma.Text > '
0'
then
begin
if aDEdLaengeb.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdBeta.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdBeta.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdBeta.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdBeta.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end;
end else
if aDEdLaengeb.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
end else
if aDEdGamma.Text > '
0'
then
begin
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdBeta.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdBeta.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
end
end;
end else
if aDEdLaengec.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end;
end;
end;
procedure TForm1.aDEdLaengeaChange(Sender: TObject);
begin
if aDEdLaengea.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
aDEdGamma.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdGamma.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdGamma.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengeb.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengec.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengeb.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end else
if aDEdGamma.Text > '
0'
then
begin
if aDEdLaengeb.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdBeta.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdBeta.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdBeta.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdBeta.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end;
end;
end;
procedure TForm1.aDEdLaengebChange(Sender: TObject);
begin
if aDEdLaengea.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdLaengeb.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdLaengeb.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
end else
if aDEdGamma.Text > '
0'
then
begin
if aDEdLaengeb.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdBeta.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdBeta.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
end else
if aDEdLaengeb.Text > '
0'
then
begin
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdBeta.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdBeta.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
end
end;
end else
if aDEdLaengeb.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
aDEdGamma.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdGamma.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdGamma.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengec.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
end
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengec.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengec.
ReadOnly := false;
end;
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
end
end else
if aDEdGamma.Text > '
0'
then
begin
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdBeta.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdBeta.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
end
end;
end;
end;
procedure TForm1.aDEdLaengecChange(Sender: TObject);
begin
if aDEdLaengea.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdLaengec.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end else
if aDEdGamma.Text > '
0'
then
begin
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdBeta.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdBeta.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end else
if aDEdLaengeb.Text > '
0'
then
begin
if aDEdLaengec.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdBeta.
ReadOnly := true;
aDEdGamma.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdBeta.
ReadOnly := false;
aDEdGamma.
ReadOnly := false;
end
end;
end else
if aDEdLaengec.Text > '
0'
then
begin
if aDEdAlpha.Text > '
0'
then
begin
if aDEdBeta.Text > '
0'
then
begin
aDEdGamma.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdGamma.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end;
if aDEdGamma.Text > '
0'
then
begin
aDEdBeta.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdBeta.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end else
if aDEdBeta.Text > '
0'
then
begin
if aDEdGamma.Text > '
0'
then
begin
aDEdAlpha.
ReadOnly := true;
aDEdLaengea.
ReadOnly := true;
aDEdLaengeb.
ReadOnly := true;
end else
begin
aDEdAlpha.
ReadOnly := false;
aDEdLaengea.
ReadOnly := false;
aDEdLaengeb.
ReadOnly := false;
end
end;
end;
end;
end.