unit Main;

interface

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

type
  TMainForm = class(TForm)
    HotKey1: THotKey;
    HotKey2: THotKey;
    HotKey3: THotKey;
    HotKey4: THotKey;
    MainMenu1: TMainMenu;
    File1: TMenuItem;
    New1: TMenuItem;
    Open1: TMenuItem;
    Save1: TMenuItem;
    N1: TMenuItem;
    Koniecpracy1: TMenuItem;
    Panel2: TPanel;
    BitBtn1: TBitBtn;
    StatusBar1: TStatusBar;
    procedure FormCreate(Sender: TObject);
    procedure Koniecpracy1Click(Sender: TObject);
    procedure Save1Click(Sender: TObject);
    procedure Open1Click(Sender: TObject);
    procedure New1Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;

implementation

{$R *.dfm}

procedure TMainForm.BitBtn1Click(Sender: TObject);
begin
	Close();
end;

procedure TMainForm.FormCreate(Sender: TObject);
begin
   HotKey1.Modifiers := [hkCtrl];
   HotKey1.InvalidKeys := [hcShift, hcAlt];
   HotKey1.Visible := false;

   HotKey2.Modifiers := [hkCtrl];
   HotKey2.InvalidKeys := [hcShift, hcAlt];
   HotKey2.Visible := false;

   HotKey3.Modifiers   := [hkCtrl];
   HotKey3.InvalidKeys := [hcShift, hcAlt];
   HotKey3.Visible := false;

   HotKey4.Modifiers := [hkCtrl];
   HotKey4.InvalidKeys := [];
   HotKey4.InvalidKeys := [hcShift, hcAlt];
   HotKey4.Visible := false;

   New1.ShortCut         := HotKey1.HotKey;
   Open1.ShortCut        := HotKey2.HotKey;
   Save1.ShortCut        := HotKey3.HotKey;
   Koniecpracy1.ShortCut := HotKey4.HotKey;
end;

procedure TMainForm.Koniecpracy1Click(Sender: TObject);
begin
   // Koniecpracy1.ShortCut = HotKey4.HotKey;
   Close();
end;

procedure TMainForm.New1Click(Sender: TObject);
begin
   // New1.ShortCut = HotKey1.HotKey;
   ShowMessage('Plik/Nowy');
end;

procedure TMainForm.Open1Click(Sender: TObject);
begin
   // Open1.ShortCut = HotKey2.HotKey;
   ShowMessage('Plik/Otwórz');
end;

procedure TMainForm.Save1Click(Sender: TObject);
begin
   // Save1.ShortCut = HotKey3.HotKey;
   ShowMessage('Plik/Zapamiętaj');
end;

end.
