📄 packinfo.dpr
字号:
program PackInfo;
uses
SysUtils,
Forms,
Dialogs,
PkgMain in 'PkgMain.pas' {PackInfoForm};
{$R *.RES}
var
I: Integer;
begin
// if no command line parameters are passed, present user with a
// TOpenDialog from which to choose a package file
if ParamCount = 0 then
begin
with TOpenDialog.Create(nil) do
try
Filter := 'Package files (*.bpl)|*.bpl|Delphi 3 Package (*.dpl)|*.dpl';
DefaultExt := '.bpl';
if Execute then PkgName := FileName;
finally
Free;
end;
end
// if a command line parameter was passed, assume first parameter is
// package file name
else begin
for I := 1 to ParamCount do
begin
if PkgName <> '' then PkgName := PkgName + ' ';
PkgName := PkgName + ParamStr(I);
end;
end;
// exit application if package file cannot be found
if (PkgName = '') or not FileExists(PkgName) then
MessageDlg(Format('File "%s" not found', [PkgName]), mtError, [mbOk], 0)
else
begin
// If all goes well, run application
Application.Initialize;
Application.CreateForm(TPackInfoForm, PackInfoForm);
Application.Run;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -