unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ExtCtrls,
  UKlasa;

type
  TMainForm = class(TForm)
    Memo1: TMemo;
    Panel1: TPanel;
    btnSTART: TBitBtn;
    procedure FormShow(Sender: TObject);
    procedure btnSTARTClick(Sender: TObject);

  private

  public

  end;

var
  MainForm: TMainForm;

implementation
{$R *.dfm}
{------------------------------------------------------------------------------}
procedure TMainForm.FormShow(Sender: TObject);
begin
   Memo1.Clear();
   Memo1.Align := alLeft;
end;

procedure TMainForm.btnSTARTClick(Sender: TObject);
var
   ob : MKlasa;

begin
   if btnSTART.Caption = '&Start' then
   begin
      btnSTART.Caption := '&Koniec';

      try
      	ob := MKlasa.Create(Memo1);
	      ob.Execute();
      finally
      	FreeAndNil(ob);
      end;
   end
   else begin
      Application.Terminate();
   end;
end;

end.
