📄 unit1.pas
字号:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, TrialSoftware, AboutSoftware;
type
TForm1 = class(TForm)
Memo1: TMemo;
Label1: TLabel;
Panel1: TPanel;
Image1: TImage;
Label2: TLabel;
Memo2: TMemo;
GroupBox1: TGroupBox;
Button1: TButton;
Label3: TLabel;
TrialSoftware1: TTrialSoftware;
Button2: TButton;
Label4: TLabel;
Button3: TButton;
Button4: TButton;
Label5: TLabel;
Label6: TLabel;
Button5: TButton;
AboutSoftware1: TAboutSoftware;
Label7: TLabel;
procedure Button3Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button5Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button3Click(Sender: TObject);
begin
Form1.Close;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
TrialSoftware1.ShowWindow;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
// If you use this fuction you can make application with
// limitate feature
if not TrialSoftware1.Shareware then
begin
MessageDlg('You application is registered. This fuction is active now.', mtInformation, [mbOk], 0);
end;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
// Status property view status of program
if TrialSoftware1.Status = stRegistered then
begin
Label6.Caption := 'Registered';
end
else if TrialSoftware1.Status = stUnregistered then
begin
Label6.Caption := 'Unregistered';
end
else if TrialSoftware1.Status = stExpired then
begin
Label6.Caption := 'Expired';
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
// You must only insert this line in Create event of main
// form to active my component
TrialSoftware1.Execute;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
AboutSoftware1.Execute;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -