-
Notifications
You must be signed in to change notification settings - Fork 0
/
KeyGenFrm.pas
43 lines (34 loc) · 920 Bytes
/
KeyGenFrm.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
unit KeyGenFrm;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, License, ClipBrd;
type
TKeyGenform = class(TForm)
eUsername: TEdit;
eRegkey: TEdit;
procedure FormCreate(Sender: TObject);
procedure eUsernameChange(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
KeyGenform: TKeyGenform;
implementation
{$R *.DFM}
procedure TKeyGenform.FormCreate(Sender: TObject);
begin
RegInfo := TRegInfo.Create($A3B75123, $CD3F5681, $0918F543, '');
end;
procedure TKeyGenform.eUsernameChange(Sender: TObject);
var Key: TKey;
begin
Key := RegInfo.Verify(eUsername.Text);
eRegKey.Text := Format('%.8x%.8x', [Key.lo, Key.hi]);
Clipboard.AsText :=
'User name: ' + eUsername.Text + #13#10 +
'Reg. code: ' + eRegKey.Text + #13#10;
end;
end.