unit PBruchhaupt;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, UBruch;
type
TForm1 =
class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Panel1: TPanel;
Panel2: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label5: TLabel;
Label6: TLabel;
Button2: TButton;
Panel3: TPanel;
Label4: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Bruch: TBruch;
GBruch: TGbruch;
E : integer;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
Bruch := TBruch.Create(StrtoInt(Edit1.Text),StrtoInt(Edit2.Text));
Panel1.Caption := IntToStr(Bruch.Zaehler_gekuerzt);
Panel2.Caption := IntToStr(Bruch.Nenner_gekuerzt);
Panel3.caption := IntToStr(GBruch.Z_ges);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Bruch.Destroy;
Close;
end;
end.