unit Main;

interface

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

type
  TMainForm = class(TForm)
    Panel1: TPanel;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    SpeedButton3: TSpeedButton;
    SpeedButton4: TSpeedButton;
    procedure SpeedButton4Click(Sender: TObject);
    procedure SpeedButton3Click(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
  private

  public
	 procedure Koniec();
  end;

var
  MainForm: TMainForm;

implementation
{$R *.dfm}

procedure TMainForm.SpeedButton1Click(Sender: TObject);
begin
	Koniec();
end;

procedure TMainForm.SpeedButton2Click(Sender: TObject);
begin
	ShowMessage('Wybrano SpeedButton 1');
end;

procedure TMainForm.SpeedButton3Click(Sender: TObject);
begin
	ShowMessage('Wybrano SpeedButton 2');
end;

procedure TMainForm.SpeedButton4Click(Sender: TObject);
begin
	ShowMessage('Wybrano SpeedButton 3');
end;

procedure TMainForm.Koniec();
begin
	if Application.MessageBox('Koniec pracy', 'Uwaga', MB_ICONINFORMATION or MB_YESNO) = mrYes then
	begin
		Close();
   end;
end;

end.
