www.pudn.com > Source.rar > Unit12.~pas, change:2013-02-07,size:1617b


unit Unit12; 
 
interface 
 
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, 
  Buttons, ExtCtrls,dialogs, jpeg; 
 
type 
  TPasswordDlg = class(TForm) 
    Panel1: TPanel; 
    Label2: TLabel; 
    Password: TEdit; 
    BitBtn1: TBitBtn; 
    Panel2: TPanel; 
    Image2: TImage; 
    BitBtn2: TBitBtn; 
    Shape1: TShape; 
    Label1: TLabel; 
    procedure FormActivate(Sender: TObject); 
    procedure FormClose(Sender: TObject; var Action: TCloseAction); 
    procedure BitBtn1Click(Sender: TObject); 
    procedure BitBtn2Click(Sender: TObject); 
  private 
  NbrEssai:Integer; 
    { Private declarations } 
  public 
    { Public declarations } 
  end; 
 
var 
  PasswordDlg: TPasswordDlg; 
 
implementation 
 
uses Unit3, Unit1; 
 
{$R *.DFM} 
 
procedure TPasswordDlg.FormActivate(Sender: TObject); 
begin 
{  if FileExists('c:\Ges-com\parametre\sql.dll') then Exit 
     Else 
     begin 
     showMessage('Cette Version né pas Enregisté Contacter SOURCING    Tél : 041-33-41-60   Tél/Fax:041-33-42-78'); 
     APPLICATION.Terminate; 
     end;} 
 
NbrEssai:=1; 
//data.config.Open; 
end; 
 
procedure TPasswordDlg.FormClose(Sender: TObject; 
  var Action: TCloseAction); 
begin 
data.config.Close; 
data.Dossiers.Close; 
end; 
 
procedure TPasswordDlg.BitBtn1Click(Sender: TObject); 
begin 
 if (Password.Text=data.ConfigMotdepasse.Value) Then 
  BEGIN 
  Face.Show; 
  Hide; 
  end 
 
   ELSE if   NbrEssai=3 Then 
  APPLICATION.Terminate; 
NbrEssai:=NbrEssai+1; 
Password.Text:=''; 
 
end; 
 
procedure TPasswordDlg.BitBtn2Click(Sender: TObject); 
begin 
close; 
end; 
 
end.