📄 printjobsreg.pas
字号:
(* GREATIS PRINT SUITE PRO *)
(* unit version 1.85.008 *)
(* Copyright (C) 2001-2007 Greatis Software *)
(* http://www.greatis.com/delphicb/printsuite/ *)
(* http://www.greatis.com/delphicb/printsuite/faq/ *)
(* http://www.greatis.com/bteam.html *)
unit PrintJobsReg;
interface
{$IFDEF VER140}
{$DEFINE NEWDSGNINTF}
{$ENDIF}
{$IFDEF VER150}
{$DEFINE NEWDSGNINTF}
{$ENDIF}
{$IFDEF VER170}
{$DEFINE NEWDSGNINTF}
{$ENDIF}
{$IFDEF VER180}
{$DEFINE NEWDSGNINTF}
{$ENDIF}
uses
{$IFDEF NEWDSGNINTF}
DesignIntf, DesignEditors,
{$ELSE}
DsgnIntf,
{$ENDIF}
Windows, Classes, Forms;
procedure Register;
implementation
uses PJSimpleGrid, PJSimpleTextGrid, PJStringGrid, PJListView, PJStrings,
PJRichEdit, PJScreenshot, PJForm, PJControl, PJImage, PJImageList, PJInvoice,
PJMulti, PJDraft, PJMultiEditor, PSJob;
{$R PJSIMPLEGRID.DCR}
{$R PJSIMPLETEXTGRID.DCR}
{$R PJSTRINGGRID.DCR}
{$R PJLISTVIEW.DCR}
{$R PJSTRINGS.DCR}
{$R PJRICHEDIT.DCR}
{$R PJSCREENSHOT.DCR}
{$R PJCONTROL.DCR}
{$R PJFORM.DCR}
{$R PJIMAGE.DCR}
{$R PJIMAGELIST.DCR}
{$R PJINVOICE.DCR}
{$R PJMULTI.DCR}
{$R PJDRAFT.DCR}
{ TMultiPrintJobEditor }
type
TMultiPrintJobEditor = class(TComponentEditor)
function GetVerbCount: Integer; override;
function GetVerb(Index: Integer): string; override;
procedure ExecuteVerb(Index: Integer); override;
end;
function TMultiPrintJobEditor.GetVerbCount: Integer;
begin
Result:=1;
end;
function TMultiPrintJobEditor.GetVerb(Index: Integer): string;
begin
Result:='&Print Jobs editor...';
end;
procedure TMultiPrintJobEditor.ExecuteVerb(Index: Integer);
var
i: Integer;
begin
with TfrmMultiEditor.Create(Application) do
try
Caption:=Component.Owner.Name+'.'+Component.Name+'.PrintJobs';
PrintJob:=TCustomMultiPrintJob(Component);
with PrintJob do
begin
for i:=0 to Pred(PrintJobCount) do
if PrintJobs[i]<>Pointer(Self) then
with lsvPrintJobs.Items.Add,TCustomPrintJob(PrintJobs[i]) do
begin
Caption:=Name;
SubItems.Add(Title);
Data:=PrintJobs[i];
end;
if ShowModal=idOK then
begin
with lsvPrintJobs,Items do
begin
PrintJobList.Clear;
for i:=0 to Pred(Count) do PrintJobList.AddObject(Items[i].Caption,Items[i].Data);
PrintJob.Update;
end;
Designer.Modified;
end;
end;
finally
Free;
end;
end;
procedure Register;
begin
RegisterComponents(
'Print Jobs',
[TSimpleGridPrintJob, TSimpleTextGridPrintJob, TStringGridPrintJob,
TListViewPrintJob, TStringsPrintJob, TRichEditPrintJob,
TScreenshotPrintJob, TControlPrintJob, TFormPrintJob, TImagePrintJob,
TImageListPrintJob, TInvoicePrintJob, TMultiPrintJob, TDraftPrintJob]);
RegisterComponentEditor(TCustomMultiPrintJob, TMultiPrintJobEditor);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -