📄 splashform.pas
字号:
unit SplashForm;
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, IniFiles;
type
TfrmSplash = class(TForm)
Panel2: TPanel;
Panel1: TPanel;
ProgramIcon: TImage;
lblProductName: TLabel;
lblVersion: TLabel;
lblCopyright: TLabel;
lblLicense: TLabel;
lblCompanyName: TLabel;
lblRegistered: TLabel;
lblTrademark: TLabel;
lblRegisteredTo: TLabel;
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmSplash: TfrmSplash;
implementation
{$R *.DFM}
procedure TfrmSplash.FormShow(Sender: TObject);
var
BS1Ini, UsersIni: TIniFile;
strDatabaseName1, License1, RegisteredTo1: string;
MaxUsers1: integer;
begin
BS1Ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'BS1.ini');
with BS1Ini do begin
if ParamStr(1) <> '' then strDatabaseName1 := ParamStr(1) //Command line parameter 1 (if present) = database name
else strDatabaseName1 := ReadString('General', 'Database', ''); //Otherwise get from ini file (if specified there)
if strDatabaseName1 = '' then strDatabaseName1 := ExtractFilePath(ParamStr(0)) + 'Data'; //Default: Set path for data files to be subdirectory "data" off program directory. eg. c:\BS1\Data
end;
BS1Ini.Free;
UsersIni := TIniFile.Create(strDatabaseName1 + '\Users.ini');
License1 := UsersIni.ReadString('General', 'License', '');
RegisteredTo1 := UsersIni.ReadString('General', 'RegisteredTo', '');
if License1 = '' then MaxUsers1 := 1 //Demo version.
else if License1 = 'b935k4' then MaxUsers1 := 1
//else if License1 = 'a9tr24' then MaxUsers1 := 2
else if License1 = 'c9kk42' then MaxUsers1 := 999
//else if License1 = 'a3ab6y' then MaxUsers1 := 4
//else if License1 = '285rer' then MaxUsers1 := 5
//else if License1 = '298bb3' then MaxUsers1 := 6
//else if License1 = 'k2w6tt' then MaxUsers1 := 7
//else if License1 = '2h9gt5' then MaxUsers1 := 8
//else if License1 = '9j5att' then MaxUsers1 := 9
//else if License1 = 'f25xfs' then MaxUsers1 := 10
else begin MaxUsers1 := 1; License1 := ''; end; //Invalid license: set to demo version.
UsersIni.Free;
if License1 = '' then lblLicense.caption := 'Demo license for evaluation purposes only'
else if MaxUsers1 = 1 then lblLicense.caption := 'Single-user license'
//else lblLicense.caption := IntToStr(MaxUsers1) + ' user network license';
else lblLicense.caption := 'Multi-user network license';
if RegisteredTo1 = '' then lblRegisteredTo.caption := ''
else lblRegisteredTo.caption := 'Registered to: ' + RegisteredTo1;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -