unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ExtCtrls, Menus, ActnList, ImgList;

type
  TMainForm = class(TForm)
    ActionList1: TActionList;
    ActionDodaj: TAction;
    ActionEdycja: TAction;
    ActionUsun: TAction;
    ActionSzukaj: TAction;
    Action1: TAction;
    MainMenu1: TMainMenu;
    Akcje1: TMenuItem;
    Dodaj1: TMenuItem;
    Edycja1: TMenuItem;
    Szukaj1: TMenuItem;
    Usu1: TMenuItem;
    Panel1: TPanel;
    imgKONIEC: TImage;
    Panel2: TPanel;
    sbDODAJ: TSpeedButton;
    sbEDIT: TSpeedButton;
    sbDELETE: TSpeedButton;
    sbFIND: TSpeedButton;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    BitBtn4: TBitBtn;
    ImageList1: TImageList;
    procedure FormShow(Sender: TObject);
    procedure imgKONIECClick(Sender: TObject);
    procedure ActionSzukajExecute(Sender: TObject);
    procedure ActionUsunExecute(Sender: TObject);
    procedure ActionEdycjaExecute(Sender: TObject);
    procedure ActionDodajExecute(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);

  private

  public
    procedure Moja_proc();
  end;

var
  MainForm: TMainForm;

implementation
{$R *.dfm}

procedure TMainForm.ActionDodajExecute(Sender: TObject);
begin
	ShowMessage('Akcja DODAJ');
end;

procedure TMainForm.ActionEdycjaExecute(Sender: TObject);
begin
	ShowMessage('Akcja EDYCJA');
end;

procedure TMainForm.ActionSzukajExecute(Sender: TObject);
begin
	ShowMessage('Akcja SZUKAJ');
end;

procedure TMainForm.ActionUsunExecute(Sender: TObject);
begin
	ShowMessage('Akcja USUŃ');
end;

procedure TMainForm.Button1Click(Sender: TObject);
begin
	// tutaj dowolna akcja
end;

procedure TMainForm.FormShow(Sender: TObject);
begin
   sbDODAJ.Caption  := '';
   sbEDIT.Caption   := '';
   sbDELETE.Caption := '';
   sbFIND.Caption   := '';
end;

procedure TMainForm.imgKONIECClick(Sender: TObject);
begin
	if Application.MessageBox('Koniec pracy', 'Uwaga', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then
   begin
		Application.Terminate();
   end;
end;

procedure TMainForm.Moja_proc();
begin

end;

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

end.
