home *** CD-ROM | disk | FTP | other *** search
- unit Unit2;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls, ExtCtrls;
-
- type
- TNewForm = class(TForm)
- Button2: TButton;
- Panel2: TPanel;
- Label1: TLabel;
- Label2: TLabel;
- Edit3: TEdit;
- Edit4: TEdit;
- procedure Button2Click(Sender: TObject);
- private
- { Private-Deklarationen }
- public
- { Public-Deklarationen }
- end;
-
- function Register: Boolean;
-
- implementation
-
- uses
- Unit1;
-
- {$R *.DFM}
-
- function Register: Boolean;
- var
- NewForm: TNewForm;
- begin
- NewForm := TNewForm.Create(Application);
- try
- NewForm.ShowModal;
- finally
- NewForm.Free;
- end;
- Result := Form1.RtRegControl1.Registered;
- end;
-
- procedure TNewForm.Button2Click(Sender: TObject);
- begin
- with Form1.RtRegControl1 do
- if Register(Edit3.Text,Edit4.Text) then
- begin
- if IsCountLock then
- DelCountLock
- else if IsDateLock then
- DelDateLock
- end
- else
- MessageDlg('Wrong registration key!',mtWarning,[mbOk],0);
- Close;
- end;
-
- end.
-