home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 September
/
Chip_2002-09_cd1.bin
/
zkuste
/
delphi
/
nastroje
/
d6
/
SPYPRIMO.ZIP
/
spyobjects
/
mainspyprimo.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
2002-06-03
|
4KB
|
175 lines
unit mainspyprimo;
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, messages,
spyobjects, StdCtrls, ExtCtrls;
type
TAcercaDelGranPrimo = class(TForm)
l11: TLabel;
l1: TLabel;
B1: TButton;
b2: TButton;
erealdi: TEdit;
Label1: TLabel;
Label2: TLabel;
edtime: TEdit;
b3: TButton;
Label3: TLabel;
E1: TEdit;
GroupBox1: TGroupBox;
rb1: TRadioButton;
rb2: TRadioButton;
rb3: TRadioButton;
Spy: TSpyPrimo;
GroupBox2: TGroupBox;
rbs1: TRadioButton;
rbs2: TRadioButton;
rbs3: TRadioButton;
rbs4: TRadioButton;
rbs5: TRadioButton;
GroupBox3: TGroupBox;
kr1: TRadioButton;
kr2: TRadioButton;
kr3: TRadioButton;
GroupBox4: TGroupBox;
rh1: TRadioButton;
rh2: TRadioButton;
rh3: TRadioButton;
procedure tMitButton1Click(Sender: TObject);
procedure B1Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure b2Click(Sender: TObject);
procedure b3Click(Sender: TObject);
private
procedure Error(Sender: TObject; E: Exception);
procedure setenables;
end;
procedure AcercaDePrimo;
implementation
{$R *.DFM}
procedure acercadeprimo;
var AboutBox :TAcercaDelGranPrimo;
begin
AboutBox := TAcercaDelGranPrimo.Create(application);
try
AboutBox.ShowModal;
finally
AboutBox.Free;
end;
end;
procedure TAcercaDelGranPrimo.tMitButton1Click(Sender: TObject);
begin
close;
end;
procedure TAcercaDelGranPrimo.B1Click(Sender: TObject);
begin
hide;
end;
procedure TAcercaDelGranPrimo.FormActivate(Sender: TObject);
begin
Application.OnException:=error;
end;
procedure TAcercaDelGranPrimo.Error(Sender: TObject; E: Exception);
begin
end;
procedure TAcercaDelGranPrimo.FormCreate(Sender: TObject);
begin
// spy:=TSpyPrimo.Create(self);
spy.Enabled:=false;
erealdi.text:=spy.dirSave;
edtime.text:=IntToStr (spy.Interval);
E1.text:=inttostr(spy.limite);
end;
procedure TAcercaDelGranPrimo.FormClose
(Sender: TObject; var Action: TCloseAction);
begin
spy.enabled:=false;
if formstyle= fsMDIChild then
action:=cafree;
end;
procedure TAcercaDelGranPrimo.setenables;
begin
b2.Enabled:=not spy.Enabled;
b3.Enabled:=spy.Enabled;
end;
procedure TAcercaDelGranPrimo.b2Click(Sender: TObject);
begin
spy.limite:= valorint_(E1.text);
if rb2.Checked then
spy.kindReport:=krFirst else
if rb3.Checked then
spy.kindReport:=krevery else
spy.kindReport:=krnone ;
if kr1.Checked then
spy.kinddump:=dmnone else
if kr2.Checked then
spy.kinddump:=dmdump else
spy.kinddump:=dmdumpident;
if rbs1.Checked then
spy.kindspy:=ksnone else
if rbs2.Checked then
spy.kindspy:=kschangescreen else
if rbs3.Checked then
spy.kindspy :=ksevery else
if rbs4.Checked then
spy.kindspy :=kschangeObject
else spy.kindspy :=ksChangeAny;
if rh1.Checked then
spy.kindhtml:=htmOnePage else
if rh2.Checked then
spy.kindhtml:=htmMultiPage else
spy.kindHtml:=htmAnimation;
spy.dirsave:= erealdi.text;
spy.Interval:= ValorInt_( edtime.text);
Spy.enabled:=true;
// Spy.control:=self;
// spy.ActiveCapture:=true;
setenables;
end;
procedure TAcercaDelGranPrimo.b3Click(Sender: TObject);
begin
spy.enabled:=false;
setenables;
end;
end.