rendered paste bodyunit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IniFiles, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Label1: TLabel;
Edit2: TEdit;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Button2: TButton;
Button3: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure Loginsgelukt;
procedure Inibestaat;
procedure Inibestaatniet;
end;
var
Form1: TForm1;
Sitesfile: TINIFile;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
if ( edit1.text='' ) OR ( edit2.text='') then form1.close;
if ( edit1.text='login' )and ( edit2.text='secure' )
THEN
loginsgelukt
else
form1.Close;
end;
procedure TForm1.Loginsgelukt;
begin
form1.Caption := 'URL extraxion tool deluxe edition V.1.0 demo version';
label3.Caption := 'welcome';
// hide first login screen
Edit1.Visible := False;
Button1.Visible := False;
Label1.Visible := False;
Edit2.Visible := False;
Label2.Visible := False;
Inibestaat;
end;
// einde inloggen////////////////////////////////////////////////////////
// ***************************************************************
procedure TForm1.Inibestaat; // begin inibestaat
begin
if not FileExists(ExtractFilePath(Application.EXEName) + 'sites.ini') then // bestaat de file danbegin
Inibestaatniet
else
label4.Caption := 'setup file checked'
end; // einde inibestaat
// **************************************************************
procedure TForm1.Inibestaatniet; // begin inibestaatniet
begin
label4.Caption := 'setup file failure';
label5.Caption := ExtractFilePath(Application.EXEName) + 'sites.ini does not exist';
label6.caption := 'do you wish to create a template ini file';
Button2.Visible:=true;
end; // einde inibestaat
// ****************************************************************
procedure TForm1.Button2Click(Sender: TObject); // begin button2
var
I:integer;
begin
Sitesfile:=TINIFile.Create(ExtractFilePath(Application.EXEName) + 'sites.ini');
sitesfile.WriteString('Settings', 'aantal', '0');
for I:= 0 to 50 do
begin
sitesfile.WriteString('Settings', 'site'+ IntToStr(I) , '');
end;
Sitesfile.free;
label4.Visible:=false;
label5.Visible:=false;
button2.Visible:=false;
label6.Visible:=false;
button3.Visible:=true;
end; //einde button2
// ****************************************************************
procedure TForm1.Button3Click(Sender: TObject);
begin
if FileExists(ExtractFilePath(Application.EXEName) + 'sites.ini') then
label4.Caption:='setup file updated'
else
label4.Caption:='setup file failed';
end;
// compleet einde
end.