unit Menu1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Menus, XPMan,UDM, StdCtrls, ExtCtrls, TeeProcs, TeEngine, Chart,ShellAPI,
  ComCtrls, jpeg;

  type
  TForm1 = class(TForm)
    XPManifest1: TXPManifest;
    MainMenu1: TMainMenu;
    N5: TMenuItem;
    N8: TMenuItem;
    N9: TMenuItem;
    N19: TMenuItem;
    N20: TMenuItem;
    N21: TMenuItem;
    N22: TMenuItem;
    N23: TMenuItem;
    N24: TMenuItem;
    N6: TMenuItem;
    StatusBar1: TStatusBar;
    Timer1: TTimer;
    N27: TMenuItem;
    N28: TMenuItem;
    N29: TMenuItem;
    N1: TMenuItem;
    N2: TMenuItem;
    N3: TMenuItem;
    N4: TMenuItem;
    N7: TMenuItem;
    Image1: TImage;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    N10: TMenuItem;
    PopupMenu1: TPopupMenu;
    N11: TMenuItem;
    N12_1: TMenuItem;
    N13_1: TMenuItem;
    N14_1: TMenuItem;
    N15_1: TMenuItem;
    FontDialog1: TFontDialog;
    procedure N10Click(Sender: TObject);
    procedure N15_1Click(Sender: TObject);
    procedure N14_1Click(Sender: TObject);
    procedure N11Click(Sender: TObject);
    procedure FormDragOver(Sender, Source: TObject; X, Y: Integer;
      State: TDragState; var Accept: Boolean);
    procedure FormDragDrop(Sender, Source: TObject; X, Y: Integer);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormActivate(Sender: TObject);
    procedure N8Click(Sender: TObject);
    procedure N1Click(Sender: TObject);
    procedure N5Click(Sender: TObject);
    procedure N23Click(Sender: TObject);
    procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure N27Click(Sender: TObject);
    procedure N4Click(Sender: TObject);
    procedure N30Click(Sender: TObject);
    procedure N29Click(Sender: TObject);
    procedure N28Click(Sender: TObject);
    procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
    procedure Timer1Timer(Sender: TObject);
    procedure N6Click(Sender: TObject);
   // procedure FormShow(Sender: TObject);
    procedure N7Click(Sender: TObject);
    procedure N24Click(Sender: TObject);
    procedure N22Click(Sender: TObject);
    procedure N21Click(Sender: TObject);
    procedure N20Click(Sender: TObject);
    procedure N19Click(Sender: TObject);
    procedure N9Click(Sender: TObject);
    procedure N18Click(Sender: TObject);
    procedure N17Click(Sender: TObject);
    procedure N16Click(Sender: TObject);
    procedure N15Click(Sender: TObject);
    procedure N14Click(Sender: TObject);
    procedure N13_1Click(Sender: TObject);
    procedure N12_1Click(Sender: TObject);
    procedure N3Click(Sender: TObject);
    procedure N2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses DobavK2, DobavCh3, DobavSpr4, ProsmK5, ProsmCh6, RedaktK7, RedaktCh8,
  UdalK9, UdalCh10, PoiskK11, PoiskCh12, SpravkAvt14, KObarotV15,
  KObarotS13, Knigi19, Chitatel20,
  Spravochniki21, Otchot122, Otchot223, Zastavka;

{$R *.dfm}

procedure TForm1.N2Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Отчёт1  ';
Otchot122.Form22.ShowModal;
end;

procedure TForm1.N3Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Отчёт 2  ';
Otchot223.Form23.showModal;
end;

procedure TForm1.N12_1Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Читательские карточки';
Chitatel20.form20.showModal;
end;

procedure TForm1.N13_1Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Вывдача книг читателям  ';
KObarotV15.form15.showModal;
end;

procedure TForm1.N14Click(Sender: TObject);
begin
ProsmCh6.form6.showModal;
end;

procedure TForm1.N15Click(Sender: TObject);
begin
RedaktK7.form7.showModal;
end;

procedure TForm1.N16Click(Sender: TObject);
begin
RedaktCh8.form8.showModal;
end;

procedure TForm1.N17Click(Sender: TObject);
begin
UdalK9.form9.showModal;
end;

procedure TForm1.N18Click(Sender: TObject);
begin
UdalCh10.form10.showModal;
end;

procedure TForm1.N9Click(Sender: TObject);
begin
close();
end;

procedure TForm1.N19Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Поиск книг ';
PoiskK11.form11.showModal;
end;

procedure TForm1.N20Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Поиск читателей  ';
PoiskCh12.form12.showModal;
end;

procedure TForm1.N21Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Ссылка на справочный HTML документ  ' ;
ShellExecute(handle, nil, 'Help\Start.html', nil, '', 1);
end;

procedure TForm1.N22Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Информация о авторе этого программного продукта  ' ;
SpravkAvt14.form14.showModal;
end;

procedure TForm1.N24Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Вывдача книг читателям  ';
KObarotV15.form15.showModal;
end;

procedure TForm1.N7Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Справочники ';
form21.DBGrid1.Visible:=true;
form21.DBGrid2.Visible:=true;
form21.DBGrid3.Visible:=true;
Spravochniki21.form21.showModal;
end;

procedure TForm1.N6Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Возврат книг от читателя';
KObarotS13.form13.ShowModal;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
var
ot,fr,rd,ob,den:string;
begin
 with StatusBar1  do
 begin
  ob:= FormatDateTime('dd MMMM yyyy ', Now);
  OutputDebugString(PChar(ob));
 den:= FormatDateTime('dddd ', Now);
  OutputDebugString(PChar(den));
   fr:= FormatDateTime('t ', Now);
  OutputDebugString(PChar(fr));
  Panels[1].Text := {'Дата: ' +} ob+'г';
  Panels[2].Text :={'День недели: '  +}den;
  Panels[3].Text := {'Время: '+} fr;
end;
  end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
StatusBar1.Panels[0].Text:='Воспользуйтесь меню для работы с программой  ' ;
end;

procedure TForm1.N28Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Книжный фонд ';
Knigi19.form19.showModal;
end;

procedure TForm1.N29Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Читательские карточки';
Chitatel20.form20.showModal;
end;

procedure TForm1.N30Click(Sender: TObject);
begin
Spravochniki21.form21.showModal;
end;

procedure TForm1.N4Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Отчёт3  ' ;
ProsmCh6.Form6.ShowModal;
end;

procedure TForm1.N27Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Выбирите нужный пункт меню  ';
end;

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
StatusBar1.Panels[0].Text:='Воспользуйтесь меню для работы с программой  ';
end;

procedure TForm1.N23Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Выбирите нужный пункт меню  ';
end;

procedure TForm1.N5Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Выбирите нужный пункт меню  ';
end;

procedure TForm1.N1Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Выбирите нужный пункт меню  ';
end;

procedure TForm1.N8Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Выбирите нужный пункт меню  ';
end;

procedure TForm1.FormActivate(Sender: TObject);
begin
Form18.WindowState := wsMinimized;
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Form18.Close;
end;

procedure TForm1.FormDragDrop(Sender, Source: TObject; X, Y: Integer);
begin
Image1.Left := X;
Image1.Top := Y;
end;

procedure TForm1.FormDragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);
begin
Accept:= True;
end;

procedure TForm1.N11Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Книжный фонд ';
Knigi19.form19.showModal;
end;

procedure TForm1.N14_1Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Возврат книг от читателя';
KObarotS13.form13.ShowModal;
end;

procedure TForm1.N15_1Click(Sender: TObject);
begin
StatusBar1.Panels[0].Text:='Поиск книг ';
PoiskK11.form11.showModal;
end;

procedure TForm1.N10Click(Sender: TObject);
begin
IF FontDialog1.Execute = True Then
   Label1.Font:= FontDialog1.Font;
End;
end;

end.
