unit udenglu;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, System.ComponentModel;

type
  TDengLuForm = class(TForm)
    name: TEdit;
    password: TEdit;
    Button1: TButton;
    Button2: TButton;
    Label1: TLabel;
    Label2: TLabel;

    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  DengLuForm: TDengLuForm;

implementation

uses umain;

{$R *.dfm}

 const
  iname='user';
  ipassword='00000';

procedure TDengLuForm.Button1Click(Sender: TObject);
begin

         if ( name.text=iname)and(password.text=ipassword) then
          Begin
          Form1.ShowModal;
          DengLuForm.Release;
         end
else
          MessageDlg( '用户名或密码不正确,请重新输入!',mtError,[mbOk],0);


end;

procedure TDengLuForm.Button2Click(Sender: TObject);
begin
close;
end;

end.
