You've already forked lazarus-ccr
tvplanit: Add translatable captions and hints to print preview dialog
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4791 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -164,6 +164,7 @@ msgid "CW"
|
||||
msgstr "KW"
|
||||
|
||||
#: vpsr.rscancelbtn
|
||||
msgctxt "vpsr.rscancelbtn"
|
||||
msgid "Cancel"
|
||||
msgstr "Abbrechen"
|
||||
|
||||
@ -809,24 +810,59 @@ msgid "Position:"
|
||||
msgstr "Position"
|
||||
|
||||
#: vpsr.rsprintbtn
|
||||
msgctxt "vpsr.rsprintbtn"
|
||||
msgid "&Print"
|
||||
msgstr "&Drucken"
|
||||
|
||||
#: vpsr.rsprintprvcancel
|
||||
msgctxt "vpsr.rsprintprvcancel"
|
||||
msgid "Cancel"
|
||||
msgstr "Abbrechen"
|
||||
|
||||
#: vpsr.rsprintprvcancelhint
|
||||
msgid "Cancel preview"
|
||||
msgstr "Durckvorschau abbrechen"
|
||||
|
||||
#: vpsr.rsprintprvfirstpage
|
||||
msgid "First Page"
|
||||
msgstr "Erste Seite"
|
||||
msgid "&First page"
|
||||
msgstr "&Erste Seite"
|
||||
|
||||
#: vpsr.rsprintprvfirstpagehint
|
||||
msgid "Go to first page"
|
||||
msgstr "Zur ersten Seite gehen"
|
||||
|
||||
#: vpsr.rsprintprvlastpage
|
||||
msgid "Last Page"
|
||||
msgstr "Letzte Seite"
|
||||
msgid "&Last page"
|
||||
msgstr "&Letzte Seite"
|
||||
|
||||
#: vpsr.rsprintprvlastpagehint
|
||||
msgid "Go to last page"
|
||||
msgstr "Zur letzten Seite gehen"
|
||||
|
||||
#: vpsr.rsprintprvnextpage
|
||||
msgid "Next Page"
|
||||
msgstr "Nächste Seite"
|
||||
msgid "&Next page"
|
||||
msgstr "&Nächste Seite"
|
||||
|
||||
#: vpsr.rsprintprvnextpagehint
|
||||
msgid "Go to next page"
|
||||
msgstr "Zur nächsten Seite gehen"
|
||||
|
||||
#: vpsr.rsprintprvprevpage
|
||||
msgid "Previous Page"
|
||||
msgstr "Vorige Seite"
|
||||
msgid "Pre&vious page"
|
||||
msgstr "&Vorige Seite"
|
||||
|
||||
#: vpsr.rsprintprvprevpagehint
|
||||
msgid "Go to previous page"
|
||||
msgstr "Zur vorigen Seite gehen"
|
||||
|
||||
#: vpsr.rsprintprvprint
|
||||
msgctxt "vpsr.rsprintprvprint"
|
||||
msgid "&Print"
|
||||
msgstr "&Drucken"
|
||||
|
||||
#: vpsr.rsprintprvprinthint
|
||||
msgid "Print"
|
||||
msgstr "Drucken"
|
||||
|
||||
#: vpsr.rsprtcontrolowner
|
||||
msgid "Print controller is not owned by a TVpControlLink!"
|
||||
|
@ -154,6 +154,7 @@ msgid "CW"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rscancelbtn
|
||||
msgctxt "vpsr.rscancelbtn"
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
@ -799,23 +800,58 @@ msgid "Position:"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintbtn
|
||||
msgctxt "vpsr.rsprintbtn"
|
||||
msgid "&Print"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvcancel
|
||||
msgctxt "vpsr.rsprintprvcancel"
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvcancelhint
|
||||
msgid "Cancel preview"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvfirstpage
|
||||
msgid "First Page"
|
||||
msgid "&First page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvfirstpagehint
|
||||
msgid "Go to first page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvlastpage
|
||||
msgid "Last Page"
|
||||
msgid "&Last page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvlastpagehint
|
||||
msgid "Go to last page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvnextpage
|
||||
msgid "Next Page"
|
||||
msgid "&Next page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvnextpagehint
|
||||
msgid "Go to next page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvprevpage
|
||||
msgid "Previous Page"
|
||||
msgid "Pre&vious page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvprevpagehint
|
||||
msgid "Go to previous page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvprint
|
||||
msgctxt "vpsr.rsprintprvprint"
|
||||
msgid "&Print"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvprinthint
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprtcontrolowner
|
||||
|
@ -164,6 +164,7 @@ msgid "CW"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rscancelbtn
|
||||
msgctxt "vpsr.rscancelbtn"
|
||||
msgid "Cancel"
|
||||
msgstr "Отмена"
|
||||
|
||||
@ -171,45 +172,9 @@ msgstr "Отмена"
|
||||
msgid "Category"
|
||||
msgstr "Категория"
|
||||
|
||||
#: vpsr.rscategorydesc0
|
||||
msgid "Category 0"
|
||||
msgstr "Категория 0"
|
||||
|
||||
#: vpsr.rscategorydesc1
|
||||
msgid "Category 1"
|
||||
msgstr "Категория 1"
|
||||
|
||||
#: vpsr.rscategorydesc2
|
||||
msgid "Category 2"
|
||||
msgstr "Категория 2"
|
||||
|
||||
#: vpsr.rscategorydesc3
|
||||
msgid "Category 3"
|
||||
msgstr "Категория 3"
|
||||
|
||||
#: vpsr.rscategorydesc4
|
||||
msgid "Category 4"
|
||||
msgstr "Категория 4"
|
||||
|
||||
#: vpsr.rscategorydesc5
|
||||
msgid "Category 5"
|
||||
msgstr "Категория 5"
|
||||
|
||||
#: vpsr.rscategorydesc6
|
||||
msgid "Category 6"
|
||||
msgstr "Категория 6"
|
||||
|
||||
#: vpsr.rscategorydesc7
|
||||
msgid "Category 7"
|
||||
msgstr "Категория 7"
|
||||
|
||||
#: vpsr.rscategorydesc8
|
||||
msgid "Category 8"
|
||||
msgstr "Категория 8"
|
||||
|
||||
#: vpsr.rscategorydesc9
|
||||
msgid "Category 9"
|
||||
msgstr "Категория 9"
|
||||
#: vpsr.rscategorydesc
|
||||
msgid "Category %d"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rscategorylabel1
|
||||
msgid "Business"
|
||||
@ -845,25 +810,70 @@ msgid "Position:"
|
||||
msgstr "Позиция:"
|
||||
|
||||
#: vpsr.rsprintbtn
|
||||
msgctxt "vpsr.rsprintbtn"
|
||||
msgid "&Print"
|
||||
msgstr "Печать"
|
||||
|
||||
#: vpsr.rsprintprvcancel
|
||||
#, fuzzy
|
||||
msgctxt "vpsr.rsprintprvcancel"
|
||||
msgid "Cancel"
|
||||
msgstr "Отмена"
|
||||
|
||||
#: vpsr.rsprintprvcancelhint
|
||||
msgid "Cancel preview"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvfirstpage
|
||||
msgid "First Page"
|
||||
#, fuzzy
|
||||
#| msgid "First Page"
|
||||
msgid "&First page"
|
||||
msgstr "Первая страницы"
|
||||
|
||||
#: vpsr.rsprintprvfirstpagehint
|
||||
msgid "Go to first page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvlastpage
|
||||
msgid "Last Page"
|
||||
#, fuzzy
|
||||
#| msgid "Last Page"
|
||||
msgid "&Last page"
|
||||
msgstr "Последняя страница"
|
||||
|
||||
#: vpsr.rsprintprvlastpagehint
|
||||
msgid "Go to last page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvnextpage
|
||||
msgid "Next Page"
|
||||
#, fuzzy
|
||||
#| msgid "Next Page"
|
||||
msgid "&Next page"
|
||||
msgstr "Следующая страница"
|
||||
|
||||
#: vpsr.rsprintprvnextpagehint
|
||||
msgid "Go to next page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvprevpage
|
||||
msgid "Previous Page"
|
||||
#, fuzzy
|
||||
#| msgid "Previous Page"
|
||||
msgid "Pre&vious page"
|
||||
msgstr "Предыдущая страница"
|
||||
|
||||
#: vpsr.rsprintprvprevpagehint
|
||||
msgid "Go to previous page"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprintprvprint
|
||||
#, fuzzy
|
||||
msgctxt "vpsr.rsprintprvprint"
|
||||
msgid "&Print"
|
||||
msgstr "Печать"
|
||||
|
||||
#: vpsr.rsprintprvprinthint
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsprtcontrolowner
|
||||
msgid "Print controller is not owned by a TVpControlLink!"
|
||||
msgstr ""
|
||||
@ -1372,3 +1382,4 @@ msgstr ""
|
||||
#: vpsr.sxmldecnotatbeg
|
||||
msgid "The XML declaration must appear before the first element"
|
||||
msgstr ""
|
||||
|
||||
|
@ -53,31 +53,27 @@ object frmPrintPreview: TfrmPrintPreview
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 1
|
||||
Height = 29
|
||||
Height = 27
|
||||
Top = 1
|
||||
Width = 475
|
||||
AutoSize = True
|
||||
ButtonHeight = 25
|
||||
ButtonWidth = 25
|
||||
Caption = 'ToolBar1'
|
||||
EdgeBorders = [ebBottom]
|
||||
Images = imMain
|
||||
List = True
|
||||
ParentShowHint = False
|
||||
ShowCaptions = True
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
object btnCancel: TSpeedButton
|
||||
Left = 132
|
||||
Height = 25
|
||||
Top = 2
|
||||
Width = 77
|
||||
Action = actCancel
|
||||
Flat = True
|
||||
Transparent = False
|
||||
end
|
||||
object btnPrint: TToolButton
|
||||
Left = 1
|
||||
Top = 2
|
||||
Action = actPrint
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 24
|
||||
Left = 52
|
||||
Height = 25
|
||||
Top = 2
|
||||
Width = 8
|
||||
@ -86,27 +82,31 @@ object frmPrintPreview: TfrmPrintPreview
|
||||
Style = tbsDivider
|
||||
end
|
||||
object btnFirstPage: TToolButton
|
||||
Left = 32
|
||||
Left = 60
|
||||
Top = 2
|
||||
Action = actFirstPage
|
||||
ShowCaption = False
|
||||
end
|
||||
object btnPrevPage: TToolButton
|
||||
Left = 55
|
||||
Left = 85
|
||||
Top = 2
|
||||
Action = actPrevPage
|
||||
ShowCaption = False
|
||||
end
|
||||
object btnNextPage: TToolButton
|
||||
Left = 78
|
||||
Left = 110
|
||||
Top = 2
|
||||
Action = actNextPage
|
||||
Action = actPrevPage
|
||||
ShowCaption = False
|
||||
end
|
||||
object btnLastPage: TToolButton
|
||||
Left = 101
|
||||
Left = 135
|
||||
Top = 2
|
||||
Action = actLastPage
|
||||
ShowCaption = False
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 124
|
||||
Left = 160
|
||||
Height = 25
|
||||
Top = 2
|
||||
Width = 8
|
||||
@ -114,6 +114,11 @@ object frmPrintPreview: TfrmPrintPreview
|
||||
ImageIndex = 6
|
||||
Style = tbsDivider
|
||||
end
|
||||
object btnCancel: TToolButton
|
||||
Left = 168
|
||||
Top = 2
|
||||
Action = actCancel
|
||||
end
|
||||
end
|
||||
end
|
||||
object VpPrintPreview1: TVpPrintPreview
|
||||
@ -133,7 +138,7 @@ object frmPrintPreview: TfrmPrintPreview
|
||||
left = 357
|
||||
top = 195
|
||||
Bitmap = {
|
||||
4C690500000010000000100000005B4848005B4848005B484800564343008679
|
||||
4C690600000010000000100000005B4848005B4848005B484800564343008679
|
||||
799CD1CDCDF3D1CDCDEFD0CCCCEFD1CCCCEFD2CDCDEFD3CDCDF38E8181A75747
|
||||
47025D4D4D005D4D4D005D4D4D005642420056424200554242004D3A3A009387
|
||||
87AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9F9494BB4F3F
|
||||
@ -293,7 +298,39 @@ object frmPrintPreview: TfrmPrintPreview
|
||||
0000CD500000B7450000BB470000BD49016FC65108FFC0490287C0480001C149
|
||||
0000C1490000C1490000C1490000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00
|
||||
FF00FFFFFF00FFFFFF00FFFFFF001919770014146E1F252596C32424A8F41A1A
|
||||
7B5818187A00161680001515850013138700111188000E0E85000E0E884B2525
|
||||
B0F22323A9CF01018A29030393001818731F22228EC35A5AEBFF6868FFFF1D1D
|
||||
B3F618187B5B16167E001515850013138700111186000D0D844C1F1FB5F18787
|
||||
FDFF8484F2FF1E1EA9CC00008F2B2D2D95C95B5BEDFFC9C9FFFFEDEDFFFF6969
|
||||
FBFF1111B9F61515805915158400131386000F0F864A1515B8F17474F8FFEBEB
|
||||
FFFFDEDEFFFF8B8BF3FF2D2DB0D53535A8F66E6EFFFFD4D4FFFFDFDFFFFFD3D3
|
||||
FFFF5D5DF7FF0808B6F413138553101086450B0BB3F26262F4FFD2D2FFFFD9D9
|
||||
FFFFD6D6FFFFAAAAFFFF4343C2FB19197B5A3333B6F46767FDFFBBBBFFFFC8C8
|
||||
FFFFC4C4FFFF4D4DF4FF0101B6FB0202B0F84C4CF1FFC1C1FFFFC6C6FFFFBFBF
|
||||
FFFF9494FEFF4343CAF80505986A13137900151579592929BDF65C5CFCFFAAAA
|
||||
FFFFB4B4FFFFB0B0FDFF3D3DECFF3636EAFFABABFDFFB3B3FFFFACACFFFF8181
|
||||
FDFF3B3BCDFB0404936B0000940015157A001010780014147E5B2020B9F74B4B
|
||||
FAFF9393FFFFA0A0FFFF9696FDFF9595FDFF9F9FFFFF9696FEFF6A6AFBFF2C2C
|
||||
C8FB0303946B000091000101960015157A0012127A000F0F7C00101082501818
|
||||
B7F94242F4FF8585FFFF8F8FFFFF8E8EFFFF8787FEFF5757F5FF1F1FC5FC0101
|
||||
955D0000920000009400010196000A0A8900080887000A0A8500101084402222
|
||||
B5F70E0EE7FF2A2AE8FF4242EAFF4242EAFF3737E7FF2929E7FF2323C2FA0101
|
||||
964D0000980000009E000000A3000A0A8900050585000F0F844C2C2CB7F21818
|
||||
F0FF0000E0FF0000D5FF0000CCFF0000CCFF0B0BD4FF2020DFFF3D3DEEFF3030
|
||||
C6F602029A5B00009C000000A300080888000C0C844A3535BCF11E1EF5FF0000
|
||||
EAFF0000DFFF0000D7FF0101DBFF0606DCFF1313D7FF2222DEFF2F2FE7FF4E4E
|
||||
F4FF3D3DCCF603039D590000A2000F0F894E3838B8F22525FAFF0000F1FF0000
|
||||
E5FF0000DFFF0505E3FF0A0AC5FD0B0BC1FB1616E3FF2121DFFF2E2EE4FF3C3C
|
||||
EEFF6060F9FF4343CBF40404A45E3939B1F23030FFFF0000F8FF0000EBFF0000
|
||||
E7FF0A0AEBFF1313C7F80A0A9660060695511313C5F42929E9FF2F2FE6FF3C3C
|
||||
EAFF4646F4FF7777FFFF4545C9F72E2EAAD43636F3FF0505FAFF0000ECFF1010
|
||||
F1FF1C1CCCFB0909956B080893000606940002029A591E1ECBF63A3AEFFF3B3B
|
||||
ECFF4C4CF6FF7171F7FF3434C0DF09098B2B2B2BA9CC2E2EF1FF1A1AFBFF2424
|
||||
C9FB0A0A966B0505920009099500070795000101970001019C5B2727CAF64F4F
|
||||
F7FF6161F5FF2E2EBDD70000A2380A0A8E0006068B292323B2CD2828C2F90909
|
||||
9869050593000707940009099500070795000202990000009A000202A45B2A2A
|
||||
C9F52525C1DA0000A0370101A400
|
||||
}
|
||||
end
|
||||
object actMain: TActionList
|
||||
@ -337,13 +374,11 @@ object frmPrintPreview: TfrmPrintPreview
|
||||
ShortCut = 16460
|
||||
end
|
||||
object actCancel: TAction
|
||||
Caption = 'Cancel preview'
|
||||
Hint = 'Cancel preview'
|
||||
ImageIndex = 5
|
||||
OnExecute = actCancelExecute
|
||||
ShortCut = 32835
|
||||
end
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
left = 181
|
||||
top = 273
|
||||
end
|
||||
end
|
||||
|
@ -36,7 +36,7 @@ uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc, LCLType, LCLIntf, LResources,
|
||||
{$ELSE}
|
||||
Windows,Messages,
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
SysUtils,
|
||||
Classes,
|
||||
@ -64,12 +64,12 @@ type
|
||||
|
||||
{ TfrmPrintPreview }
|
||||
|
||||
TfrmPrintPreview = class (TForm)
|
||||
ImageList1: TImageList;
|
||||
Panel1 : TPanel;
|
||||
cboxZoom : TComboBox;
|
||||
VpPrintPreview1 : TVpPrintPreview;
|
||||
VpPrintFormatComboBox1 : TVpPrintFormatComboBox;
|
||||
TfrmPrintPreview = class(TForm)
|
||||
Panel1: TPanel;
|
||||
cboxZoom: TComboBox;
|
||||
btnCancel: TToolButton;
|
||||
VpPrintPreview1: TVpPrintPreview;
|
||||
VpPrintFormatComboBox1: TVpPrintFormatComboBox;
|
||||
ToolBar1: TToolBar;
|
||||
btnPrint: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
@ -86,13 +86,8 @@ type
|
||||
actNextPage: TAction;
|
||||
actLastPage: TAction;
|
||||
actCancel: TAction;
|
||||
btnCancel: TSpeedButton;
|
||||
|
||||
procedure OKBtnClick (Sender : TObject);
|
||||
procedure btnFirstPageClick(Sender: TObject);
|
||||
procedure btnPrevPageClick(Sender: TObject);
|
||||
procedure btnNextPageClick(Sender: TObject);
|
||||
procedure btnLastPageClick(Sender: TObject);
|
||||
procedure cboxZoomChange(Sender: TObject);
|
||||
procedure actPrintExecute(Sender: TObject);
|
||||
procedure actFirstPageExecute(Sender: TObject);
|
||||
@ -108,64 +103,57 @@ type
|
||||
procedure SetCaptions;
|
||||
|
||||
public
|
||||
Resource : TVpResource;
|
||||
Contact : TVpContact;
|
||||
ReturnCode : TVpEditorReturnCode;
|
||||
Resource: TVpResource;
|
||||
Contact: TVpContact;
|
||||
ReturnCode: TVpEditorReturnCode;
|
||||
end;
|
||||
|
||||
TVpPrintPreviewDialog = class (TVpBaseDialog)
|
||||
private
|
||||
FControlLink : TVpControlLink;
|
||||
FAutoPrint : Boolean;
|
||||
FBottomMargin : Extended;
|
||||
FEndDate : TDateTime;
|
||||
FLeftMargin : Extended;
|
||||
FMarginUnits : TVpItemMeasurement;
|
||||
FRightMargin : Extended;
|
||||
FStartDate : TDateTime;
|
||||
FTopMargin : Extended;
|
||||
FZoomFactor : TVpPPZoomFactor;
|
||||
FWindowState : TWindowState;
|
||||
FPrinter : TPrinter;
|
||||
FControlLink: TVpControlLink;
|
||||
FAutoPrint: Boolean;
|
||||
FBottomMargin: Extended;
|
||||
FEndDate: TDateTime;
|
||||
FLeftMargin: Extended;
|
||||
FMarginUnits: TVpItemMeasurement;
|
||||
FRightMargin: Extended;
|
||||
FStartDate: TDateTime;
|
||||
FTopMargin: Extended;
|
||||
FZoomFactor: TVpPPZoomFactor;
|
||||
FWindowState: TWindowState;
|
||||
FPrinter: TPrinter;
|
||||
|
||||
protected
|
||||
procedure Notification (AComponent : TComponent;
|
||||
Operation : TOperation); override;
|
||||
procedure SetAutoPrint (const v : Boolean);
|
||||
procedure SetBottomMargin (const v : Extended);
|
||||
procedure SetControlLink (const v : TVpControlLink);
|
||||
procedure SetEndDate (const v : TDateTime);
|
||||
procedure SetLeftMargin (const v : Extended);
|
||||
procedure SetMarginUnits (const v : TVpItemMeasurement);
|
||||
procedure SetRightMargin (const v : Extended);
|
||||
procedure SetStartDate (const v : TDateTime);
|
||||
procedure SetTopMargin (const v : Extended);
|
||||
procedure SetZoomFactor (const v : TVpPPZoomFactor);
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure SetAutoPrint(const v: Boolean);
|
||||
procedure SetBottomMargin(const v: Extended);
|
||||
procedure SetControlLink(const v: TVpControlLink);
|
||||
procedure SetEndDate(const v: TDateTime);
|
||||
procedure SetLeftMargin(const v: Extended);
|
||||
procedure SetMarginUnits(const v: TVpItemMeasurement);
|
||||
procedure SetRightMargin(const v: Extended);
|
||||
procedure SetStartDate(const v: TDateTime);
|
||||
procedure SetTopMargin(const v: Extended);
|
||||
procedure SetZoomFactor(const v: TVpPPZoomFactor);
|
||||
|
||||
public
|
||||
constructor Create (AOwner : TComponent); override;
|
||||
function Execute : Boolean; override;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
function Execute: Boolean; override;
|
||||
|
||||
property Printer : TPrinter read FPrinter write FPrinter;
|
||||
property Printer: TPrinter read FPrinter write FPrinter;
|
||||
|
||||
published
|
||||
property AutoPrint : Boolean read FAutoPrint write SetAutoPrint
|
||||
default False;
|
||||
property BottomMargin : Extended
|
||||
read FBottomMargin write SetBottomMargin;
|
||||
property ControlLink : TVpControlLink
|
||||
read FControlLink write SetControlLink;
|
||||
property EndDate : TDateTime read FEndDate write SetEndDate;
|
||||
property LeftMargin : Extended read FLeftMargin write SetLeftMargin;
|
||||
property MarginUnits : TVpItemMeasurement
|
||||
read FMarginUnits write SetMarginUnits default imInches;
|
||||
property RightMargin : Extended read FRightMargin write SetRightMargin;
|
||||
property StartDate : TDateTime read FStartDate write SetStartDate;
|
||||
property TopMargin : Extended read FTopMargin write SetTopMargin;
|
||||
property WindowState : TWindowState read FWindowState write FWindowState
|
||||
default wsNormal;
|
||||
property ZoomFactor : TVpPPZoomFactor
|
||||
read FZoomFactor write SetZoomFactor default zfFitToControl;
|
||||
property AutoPrint: Boolean read FAutoPrint write SetAutoPrint default False;
|
||||
property BottomMargin: Extended read FBottomMargin write SetBottomMargin;
|
||||
property ControlLink: TVpControlLink read FControlLink write SetControlLink;
|
||||
property EndDate: TDateTime read FEndDate write SetEndDate;
|
||||
property LeftMargin: Extended read FLeftMargin write SetLeftMargin;
|
||||
property MarginUnits: TVpItemMeasurement read FMarginUnits write SetMarginUnits default imInches;
|
||||
property RightMargin: Extended read FRightMargin write SetRightMargin;
|
||||
property StartDate: TDateTime read FStartDate write SetStartDate;
|
||||
property TopMargin: Extended read FTopMargin write SetTopMargin;
|
||||
property WindowState: TWindowState read FWindowState write FWindowState default wsNormal;
|
||||
property ZoomFactor: TVpPPZoomFactor read FZoomFactor write SetZoomFactor default zfFitToControl;
|
||||
|
||||
property DataStore;
|
||||
property Options;
|
||||
@ -189,7 +177,18 @@ end;
|
||||
procedure TfrmPrintPreview.SetCaptions;
|
||||
begin
|
||||
Self.Caption := RSDlgPrintPreview;
|
||||
actCancel.Caption := RSCancelBtn;
|
||||
actPrint.Caption := RSPrintPrvPrint;
|
||||
actPrint.Hint := RSPrintPrvPrintHint;
|
||||
actFirstPage.Caption := RSPrintPrvFirstPage;
|
||||
actFirstPage.Hint := RSPrintPrvFirstPageHint;
|
||||
actPrevPage.Caption := RSPrintPrvPrevPage;
|
||||
actPrevPage.Hint := RsPrintPrvPrevPageHint;
|
||||
actNextPage.Caption := RSPrintPrvNextPage;
|
||||
actNextPage.Hint := RSPrintPrvNextPageHint;
|
||||
actLastPage.Caption := RSPrintPrvLastPage;
|
||||
actLastPage.Hint := RSPrintPrvLastPageHint;
|
||||
actCancel.Caption := RSPrintPrvCancel;
|
||||
actCancel.Hint := RSPrintPrvCancelHint;
|
||||
end;
|
||||
|
||||
|
||||
@ -199,26 +198,26 @@ begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
constructor TVpPrintPreviewDialog.Create (AOwner : TComponent);
|
||||
constructor TVpPrintPreviewDialog.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create (AOwner);
|
||||
FPlacement.Height := 480;
|
||||
FPlacement.Width := 640;
|
||||
StartDate := Now;
|
||||
EndDate := Now + 7;
|
||||
FZoomFactor := zfFitToControl;
|
||||
FWindowState := wsNormal;
|
||||
FAutoPrint := False;
|
||||
FControlLink := SearchControlLink (Owner);
|
||||
FPrinter := Printer;
|
||||
FPlacement.Width := 640;
|
||||
StartDate := Now;
|
||||
EndDate := Now + 7;
|
||||
FZoomFactor := zfFitToControl;
|
||||
FWindowState := wsNormal;
|
||||
FAutoPrint := False;
|
||||
FControlLink := SearchControlLink(Owner);
|
||||
FPrinter := Printer;
|
||||
end;
|
||||
|
||||
function TVpPrintPreviewDialog.Execute : Boolean;
|
||||
function TVpPrintPreviewDialog.Execute: Boolean;
|
||||
var
|
||||
EditForm : TfrmPrintPreview;
|
||||
EditForm: TfrmPrintPreview;
|
||||
begin
|
||||
Result := False;
|
||||
Application.CreateForm (TfrmPrintPreview, EditForm);
|
||||
Application.CreateForm(TfrmPrintPreview, EditForm);
|
||||
try
|
||||
DoFormPlacement(EditForm);
|
||||
EditForm.WindowState := WindowState;
|
||||
@ -234,10 +233,10 @@ begin
|
||||
if EditForm.ReturnCode = rtCommit then begin
|
||||
Result := True;
|
||||
end;
|
||||
if AutoPrint and Assigned (FControlLink) and Result then begin
|
||||
if AutoPrint and Assigned(FControlLink) and Result then begin
|
||||
Printer.BeginDoc;
|
||||
try
|
||||
FControlLink.Printer.Print (Printer, StartDate, EndDate);
|
||||
FControlLink.Printer.Print(Printer, StartDate, EndDate);
|
||||
finally
|
||||
Printer.EndDoc;
|
||||
end;
|
||||
@ -247,18 +246,19 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TVpPrintPreviewDialog.Notification (AComponent : TComponent;
|
||||
Operation : TOperation);
|
||||
{-Handle new/deleted components}
|
||||
{ Handle new/deleted components}
|
||||
procedure TVpPrintPreviewDialog.Notification(AComponent: TComponent;
|
||||
Operation : TOperation);
|
||||
begin
|
||||
inherited Notification (AComponent, Operation);
|
||||
inherited Notification(AComponent, Operation);
|
||||
|
||||
if Operation = opRemove then begin
|
||||
{Owned components going away}
|
||||
if AComponent = FControlLink then begin
|
||||
FControlLink := nil;
|
||||
end;
|
||||
end else if Operation = opInsert then begin
|
||||
end else
|
||||
if Operation = opInsert then begin
|
||||
if AComponent is TVpControlLink then begin
|
||||
if not Assigned (FControlLink) then begin
|
||||
FControlLink := TVpControlLink (AComponent);
|
||||
@ -267,87 +267,66 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TVpPrintPreviewDialog.SetAutoPrint (const v : Boolean);
|
||||
procedure TVpPrintPreviewDialog.SetAutoPrint(const v: Boolean);
|
||||
begin
|
||||
if v <> FAutoPrint then
|
||||
FAutoPrint := v;
|
||||
end;
|
||||
|
||||
procedure TVpPrintPreviewDialog.SetBottomMargin (const v : Extended);
|
||||
procedure TVpPrintPreviewDialog.SetBottomMargin(const v: Extended);
|
||||
begin
|
||||
if v <> FBottomMargin then
|
||||
FBottomMargin := v;
|
||||
end;
|
||||
|
||||
procedure TVpPrintPreviewDialog.SetControlLink (const v : TVpControlLink);
|
||||
procedure TVpPrintPreviewDialog.SetControlLink(const v: TVpControlLink);
|
||||
begin
|
||||
if FControlLink <> v then
|
||||
FControlLink := v;
|
||||
end;
|
||||
|
||||
procedure TVpPrintPreviewDialog.SetEndDate (const v : TDateTime);
|
||||
procedure TVpPrintPreviewDialog.SetEndDate(const v: TDateTime);
|
||||
begin
|
||||
if v <> FEndDate then
|
||||
FEndDate := v;
|
||||
end;
|
||||
|
||||
procedure TVpPrintPreviewDialog.SetLeftMargin (const v : Extended);
|
||||
procedure TVpPrintPreviewDialog.SetLeftMargin(const v: Extended);
|
||||
begin
|
||||
if v <> FLeftMargin then
|
||||
FLeftMargin := v;
|
||||
end;
|
||||
|
||||
procedure TVpPrintPreviewDialog.SetMarginUnits (const v : TVpItemMeasurement);
|
||||
procedure TVpPrintPreviewDialog.SetMarginUnits(const v: TVpItemMeasurement);
|
||||
begin
|
||||
if v <> FMarginUnits then
|
||||
FMarginUnits := v;
|
||||
end;
|
||||
|
||||
procedure TVpPrintPreviewDialog.SetRightMargin (const v : Extended);
|
||||
procedure TVpPrintPreviewDialog.SetRightMargin(const v: Extended);
|
||||
begin
|
||||
if v <> FRightMargin then
|
||||
FRightMargin := v;
|
||||
end;
|
||||
|
||||
procedure TVpPrintPreviewDialog.SetStartDate (const v : TDateTime);
|
||||
procedure TVpPrintPreviewDialog.SetStartDate(const v: TDateTime);
|
||||
begin
|
||||
if v <> FStartDate then
|
||||
FStartDate := v;
|
||||
end;
|
||||
|
||||
procedure TVpPrintPreviewDialog.SetTopMargin (const v : Extended);
|
||||
procedure TVpPrintPreviewDialog.SetTopMargin(const v: Extended);
|
||||
begin
|
||||
if v <> FTopMargin then
|
||||
FTopMargin := v;
|
||||
end;
|
||||
|
||||
procedure TVpPrintPreviewDialog.SetZoomFactor (const v : TVpPPZoomFactor);
|
||||
procedure TVpPrintPreviewDialog.SetZoomFactor(const v: TVpPPZoomFactor);
|
||||
begin
|
||||
if v <> FZoomFactor then
|
||||
FZoomFactor := v;
|
||||
end;
|
||||
|
||||
{ TfrmPrintPreview }
|
||||
procedure TfrmPrintPreview.btnFirstPageClick(Sender: TObject);
|
||||
begin
|
||||
VpPrintPreview1.FirstPage;
|
||||
end;
|
||||
|
||||
procedure TfrmPrintPreview.btnPrevPageClick(Sender: TObject);
|
||||
begin
|
||||
VpPrintPreview1.PrevPage;
|
||||
end;
|
||||
|
||||
procedure TfrmPrintPreview.btnNextPageClick(Sender: TObject);
|
||||
begin
|
||||
VpPrintPreview1.NextPage;
|
||||
end;
|
||||
|
||||
procedure TfrmPrintPreview.btnLastPageClick(Sender: TObject);
|
||||
begin
|
||||
VpPrintPreview1.LastPage;
|
||||
end;
|
||||
|
||||
procedure TfrmPrintPreview.cboxZoomChange(Sender: TObject);
|
||||
begin
|
||||
VpPrintPreview1.ZoomFactor := TVpPPZoomFactor(cboxZoom.ItemIndex);
|
||||
|
@ -167,10 +167,18 @@ resourcestring
|
||||
RSWeekPopupNavPrevYear = 'Previous Year';
|
||||
|
||||
{ Print Preview Specific }
|
||||
RSPrintPrvPrevPage = 'Previous Page';
|
||||
RSPrintPrvNextPage = 'Next Page';
|
||||
RSPrintPrvFirstPage = 'First Page';
|
||||
RSPrintPrvLastPage = 'Last Page';
|
||||
RSPrintPrvPrint = '&Print';
|
||||
RSPrintPrvPrintHint = 'Print';
|
||||
RSPrintPrvPrevPage = 'Pre&vious page';
|
||||
RSPrintPrvNextPage = '&Next page';
|
||||
RSPrintPrvFirstPage = '&First page';
|
||||
RSPrintPrvLastPage = '&Last page';
|
||||
RSPrintPrvFirstPageHint = 'Go to first page';
|
||||
RSPrintPrvPrevPageHint = 'Go to previous page';
|
||||
RSPrintPrvNextPageHint = 'Go to next page';
|
||||
RSPrintPrvLastPageHint = 'Go to last page';
|
||||
RSPrintPrvCancel = 'Cancel';
|
||||
RSPrintPrvCancelHint = 'Cancel preview';
|
||||
|
||||
{ DayView Specific }
|
||||
RSDayPopupAdd = 'Add Event...';
|
||||
|
Reference in New Issue
Block a user