unit Unit2;

interface

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

type
  TForm2 = class(TForm)
    GroupBox1: TGroupBox;
    Button1: TButton;
    Image1: TImage;
    Label1: TLabel;
    Label2: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

uses Unit3;

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
begin
 if (Edit1.Text='administrator') and (Edit2.Text='2145') then
 begin
 Form3.ShowModal;
 Edit2.Clear;
 Form2.Close;
 end
 else
 ShowMessage('Проверьте правильность пароля!');
end;

procedure TForm2.Button2Click(Sender: TObject);
begin
Form2.Close;
end;

end.
