tvplanit: Fix Fulldemo's Print routine.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5048 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-07-29 16:48:36 +00:00
parent ccf954454a
commit 5cfee9383f
11 changed files with 187 additions and 128 deletions

View File

@ -42,7 +42,7 @@
<PackageName Value="LCL"/>
</Item3>
</RequiredPackages>
<Units Count="3">
<Units Count="4">
<Unit0>
<Filename Value="demo.lpr"/>
<IsPartOfProject Value="True"/>
@ -59,6 +59,13 @@
<Filename Value="sound.pas"/>
<IsPartOfProject Value="True"/>
</Unit2>
<Unit3>
<Filename Value="ExVpRptSetup.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="frmReportSetup"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit3>
</Units>
</ProjectOptions>
<CompilerOptions>

View File

@ -150,7 +150,7 @@ uses
LCLVersion, LResources, LazFileUtils, LazUTF8, StrUtils, DateUtils, Translations,
IniFiles, Math, Printers,
VpMisc, VpPrtFmt,
sound;
sound, ExVpRptSetup;
{$UNDEF UTF8_CALLS}
{$IFDEF LCL}
@ -401,15 +401,31 @@ begin
end;
procedure TMainForm.MnuPrintClick(Sender: TObject);
var
F: TfrmReportSetup;
begin
if ReportData.StartDate = 0 then
ReportData.StartDate := VpMonthView1.Date;
if ReportData.EndDate = 0 then
ReportData.EndDate := VpMonthView1.Date;
if ReportData.Format = '' then
ReportData.Format := VpControlLink1.Printer.PrintFormats.Items[0].FormatName;
F := TfrmReportSetup.Create(nil);
try
F.ControlLink := VpControlLink1;
if not F.Execute(ReportData) then
exit;
if PrintDialog1.Execute then begin
Printer.BeginDoc;
{
VpControlLink1.Printer.CurFormat := VpControlLink1.Printer.Find(ReportData.Format);
VpControlLink1.Printer.Print(Printer, ReportData.StartDate, ReportData.EndDate);
}
Printer.EndDoc;
end;
finally
F.Free;
end;
end;
procedure TMainForm.MnuPrintPreviewClick(Sender: TObject);

View File

@ -145,62 +145,64 @@ msgstr "Mittwoch"
msgid "XML files (*.xml)"
msgstr "XML-Dateien (*.XML)"
#: tfrmreportsetup.button1.caption
msgctxt "tfrmreportsetup.button1.caption"
msgid "OK"
msgstr "OK"
#: tfrmreportsetup.button2.caption
msgctxt "tfrmreportsetup.button2.caption"
#: tfrmreportsetup.btncancel.caption
#, fuzzy
msgctxt "tfrmreportsetup.btncancel.caption"
msgid "Cancel"
msgstr "Abbrechen"
#: tfrmreportsetup.btnok.caption
#, fuzzy
msgctxt "tfrmreportsetup.btnok.caption"
msgid "OK"
msgstr "OK"
#: tfrmreportsetup.caption
msgid "Report Setup"
msgstr ""
#: tfrmreportsetup.dateedit1.cancelcaption
msgctxt "tfrmreportsetup.dateedit1.cancelcaption"
#: tfrmreportsetup.edenddate.cancelcaption
#, fuzzy
msgctxt "tfrmreportsetup.edenddate.cancelcaption"
msgid "Cancel"
msgstr "Abbrechen"
#: tfrmreportsetup.dateedit1.okcaption
msgctxt "tfrmreportsetup.dateedit1.okcaption"
#: tfrmreportsetup.edenddate.okcaption
#, fuzzy
msgctxt "tfrmreportsetup.edenddate.okcaption"
msgid "OK"
msgstr "OK"
# No need to translate
#: tfrmreportsetup.dateedit1.text
msgid "DateEdit1"
msgstr ""
#: tfrmreportsetup.dateedit2.cancelcaption
msgctxt "tfrmreportsetup.dateedit2.cancelcaption"
#: tfrmreportsetup.edstartdate.cancelcaption
#, fuzzy
msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
msgid "Cancel"
msgstr "Abbrechen"
#: tfrmreportsetup.dateedit2.okcaption
msgctxt "tfrmreportsetup.dateedit2.okcaption"
#: tfrmreportsetup.edstartdate.okcaption
#, fuzzy
msgctxt "tfrmreportsetup.edstartdate.okcaption"
msgid "OK"
msgstr "OK"
# No need to translate
#: tfrmreportsetup.dateedit2.text
msgid "DateEdit2"
msgstr ""
#: tfrmreportsetup.label1.caption
msgid "Start Date:"
msgstr "Startdatum:"
#: tfrmreportsetup.label2.caption
#: tfrmreportsetup.lblenddate.caption
#, fuzzy
msgctxt "tfrmreportsetup.lblenddate.caption"
msgid "End Date:"
msgstr "Enddatum:"
#: tfrmreportsetup.label3.caption
#: tfrmreportsetup.lblformat.caption
#, fuzzy
msgctxt "tfrmreportsetup.lblformat.caption"
msgid "Format:"
msgstr "Format:"
#: tfrmreportsetup.lblstartdate.caption
#, fuzzy
msgctxt "tfrmreportsetup.lblstartdate.caption"
msgid "Start Date:"
msgstr "Startdatum:"
#: tmainform.btndeleteres.caption
msgid "Delete"
msgstr "Löschen"
@ -327,3 +329,4 @@ msgstr "Fertiggestellte Aufgaben ausblenden"
#: tmainform.titlelbl.caption
msgid "TitleLbl"
msgstr ""

View File

@ -134,60 +134,64 @@ msgstr "Woensdag"
msgid "XML files (*.xml)"
msgstr ""
#: tfrmreportsetup.button1.caption
msgctxt "tfrmreportsetup.button1.caption"
msgid "OK"
msgstr "OK"
#: tfrmreportsetup.button2.caption
msgctxt "tfrmreportsetup.button2.caption"
#: tfrmreportsetup.btncancel.caption
#, fuzzy
msgctxt "tfrmreportsetup.btncancel.caption"
msgid "Cancel"
msgstr "Annuleren"
#: tfrmreportsetup.btnok.caption
#, fuzzy
msgctxt "tfrmreportsetup.btnok.caption"
msgid "OK"
msgstr "OK"
#: tfrmreportsetup.caption
msgid "Report Setup"
msgstr "Overzicht Instellingen"
#: tfrmreportsetup.dateedit1.cancelcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT1.CANCELCAPTION"
#: tfrmreportsetup.edenddate.cancelcaption
#, fuzzy
msgctxt "tfrmreportsetup.edenddate.cancelcaption"
msgid "Cancel"
msgstr "Annuleren"
#: tfrmreportsetup.dateedit1.okcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT1.OKCAPTION"
#: tfrmreportsetup.edenddate.okcaption
#, fuzzy
msgctxt "tfrmreportsetup.edenddate.okcaption"
msgid "OK"
msgstr "OK"
#: tfrmreportsetup.dateedit1.text
msgid "DateEdit1"
msgstr "DateEdit1"
#: tfrmreportsetup.dateedit2.cancelcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT2.CANCELCAPTION"
#: tfrmreportsetup.edstartdate.cancelcaption
#, fuzzy
msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
msgid "Cancel"
msgstr "Annuleren"
#: tfrmreportsetup.dateedit2.okcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT2.OKCAPTION"
#: tfrmreportsetup.edstartdate.okcaption
#, fuzzy
msgctxt "tfrmreportsetup.edstartdate.okcaption"
msgid "OK"
msgstr "OK"
#: tfrmreportsetup.dateedit2.text
msgid "DateEdit2"
msgstr "DateEdit2"
#: tfrmreportsetup.label1.caption
msgid "Start Date:"
msgstr "Start Datum:"
#: tfrmreportsetup.label2.caption
#: tfrmreportsetup.lblenddate.caption
#, fuzzy
msgctxt "tfrmreportsetup.lblenddate.caption"
msgid "End Date:"
msgstr "Eind Datum:"
#: tfrmreportsetup.label3.caption
#: tfrmreportsetup.lblformat.caption
#, fuzzy
msgctxt "tfrmreportsetup.lblformat.caption"
msgid "Format:"
msgstr "Formaat:"
#: tfrmreportsetup.lblstartdate.caption
#, fuzzy
msgctxt "tfrmreportsetup.lblstartdate.caption"
msgid "Start Date:"
msgstr "Start Datum:"
#: tmainform.btndeleteres.caption
msgid "Delete"
msgstr "Wissen"

View File

@ -134,60 +134,55 @@ msgstr ""
msgid "XML files (*.xml)"
msgstr ""
#: tfrmreportsetup.button1.caption
msgctxt "tfrmreportsetup.button1.caption"
msgid "OK"
#: tfrmreportsetup.btncancel.caption
msgctxt "tfrmreportsetup.btncancel.caption"
msgid "Cancel"
msgstr ""
#: tfrmreportsetup.button2.caption
msgctxt "tfrmreportsetup.button2.caption"
msgid "Cancel"
#: tfrmreportsetup.btnok.caption
msgctxt "tfrmreportsetup.btnok.caption"
msgid "OK"
msgstr ""
#: tfrmreportsetup.caption
msgid "Report Setup"
msgstr ""
#: tfrmreportsetup.dateedit1.cancelcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT1.CANCELCAPTION"
#: tfrmreportsetup.edenddate.cancelcaption
msgctxt "tfrmreportsetup.edenddate.cancelcaption"
msgid "Cancel"
msgstr ""
#: tfrmreportsetup.dateedit1.okcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT1.OKCAPTION"
#: tfrmreportsetup.edenddate.okcaption
msgctxt "tfrmreportsetup.edenddate.okcaption"
msgid "OK"
msgstr ""
#: tfrmreportsetup.dateedit1.text
msgid "DateEdit1"
msgstr ""
#: tfrmreportsetup.dateedit2.cancelcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT2.CANCELCAPTION"
#: tfrmreportsetup.edstartdate.cancelcaption
msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
msgid "Cancel"
msgstr ""
#: tfrmreportsetup.dateedit2.okcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT2.OKCAPTION"
#: tfrmreportsetup.edstartdate.okcaption
msgctxt "tfrmreportsetup.edstartdate.okcaption"
msgid "OK"
msgstr ""
#: tfrmreportsetup.dateedit2.text
msgid "DateEdit2"
msgstr ""
#: tfrmreportsetup.label1.caption
msgid "Start Date:"
msgstr ""
#: tfrmreportsetup.label2.caption
#: tfrmreportsetup.lblenddate.caption
msgctxt "tfrmreportsetup.lblenddate.caption"
msgid "End Date:"
msgstr ""
#: tfrmreportsetup.label3.caption
#: tfrmreportsetup.lblformat.caption
msgctxt "tfrmreportsetup.lblformat.caption"
msgid "Format:"
msgstr ""
#: tfrmreportsetup.lblstartdate.caption
msgctxt "tfrmreportsetup.lblstartdate.caption"
msgid "Start Date:"
msgstr ""
#: tmainform.btndeleteres.caption
msgid "Delete"
msgstr ""

View File

@ -144,62 +144,61 @@ msgstr "Среда"
msgid "XML files (*.xml)"
msgstr ""
#: tfrmreportsetup.button1.caption
msgctxt "tfrmreportsetup.button1.caption"
msgid "OK"
msgstr ""
#: tfrmreportsetup.button2.caption
msgctxt "tfrmreportsetup.button2.caption"
#: tfrmreportsetup.btncancel.caption
#, fuzzy
msgctxt "tfrmreportsetup.btncancel.caption"
msgid "Cancel"
msgstr "Отмена"
#: tfrmreportsetup.btnok.caption
msgctxt "tfrmreportsetup.btnok.caption"
msgid "OK"
msgstr ""
#: tfrmreportsetup.caption
msgid "Report Setup"
msgstr "Параметры отчёта"
#: tfrmreportsetup.dateedit1.cancelcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT1.CANCELCAPTION"
#: tfrmreportsetup.edenddate.cancelcaption
#, fuzzy
msgctxt "tfrmreportsetup.edenddate.cancelcaption"
msgid "Cancel"
msgstr "Отмена"
#: tfrmreportsetup.dateedit1.okcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT1.OKCAPTION"
#: tfrmreportsetup.edenddate.okcaption
msgctxt "tfrmreportsetup.edenddate.okcaption"
msgid "OK"
msgstr ""
# No need to translate
#: tfrmreportsetup.dateedit1.text
msgid "DateEdit1"
msgstr ""
#: tfrmreportsetup.dateedit2.cancelcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT2.CANCELCAPTION"
#: tfrmreportsetup.edstartdate.cancelcaption
#, fuzzy
msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
msgid "Cancel"
msgstr "Отмена"
#: tfrmreportsetup.dateedit2.okcaption
msgctxt "TFRMREPORTSETUP.DATEEDIT2.OKCAPTION"
#: tfrmreportsetup.edstartdate.okcaption
msgctxt "tfrmreportsetup.edstartdate.okcaption"
msgid "OK"
msgstr ""
# No need to translate
#: tfrmreportsetup.dateedit2.text
msgid "DateEdit2"
msgstr ""
#: tfrmreportsetup.label1.caption
msgid "Start Date:"
msgstr "Дата начала:"
#: tfrmreportsetup.label2.caption
#: tfrmreportsetup.lblenddate.caption
#, fuzzy
msgctxt "tfrmreportsetup.lblenddate.caption"
msgid "End Date:"
msgstr "Дата окончания:"
#: tfrmreportsetup.label3.caption
#: tfrmreportsetup.lblformat.caption
#, fuzzy
msgctxt "tfrmreportsetup.lblformat.caption"
msgid "Format:"
msgstr "Формат:"
#: tfrmreportsetup.lblstartdate.caption
#, fuzzy
msgctxt "tfrmreportsetup.lblstartdate.caption"
msgid "Start Date:"
msgstr "Дата начала:"
#: tmainform.btndeleteres.caption
msgid "Delete"
msgstr "Удалить"

View File

@ -551,6 +551,10 @@ msgstr "Vorname:"
msgid "Font..."
msgstr "Schriftart..."
#: vpsr.rsformatlbl
msgid "Format:"
msgstr "Format:"
#: vpsr.rsformats
msgid "Formats:"
msgstr "Formate:"
@ -1041,6 +1045,10 @@ msgstr "Termin-Wiederholung:"
msgid "Reminder"
msgstr "Erinnerung"
#: vpsr.rsreportsetup
msgid "Report setup"
msgstr "Druck einrichten"
#: vpsr.rsresource
msgid "Resource"
msgstr "Ressource"

View File

@ -554,6 +554,10 @@ msgstr "Voornaam:"
msgid "Font..."
msgstr ""
#: vpsr.rsformatlbl
msgid "Format:"
msgstr ""
#: vpsr.rsformats
msgid "Formats:"
msgstr ""
@ -1044,6 +1048,10 @@ msgstr "Afspraak herhaling:"
msgid "Reminder"
msgstr "Herinnering"
#: vpsr.rsreportsetup
msgid "Report setup"
msgstr ""
#: vpsr.rsresource
msgid "Resource"
msgstr "Hulpmiddel"

View File

@ -541,6 +541,10 @@ msgstr ""
msgid "Font..."
msgstr ""
#: vpsr.rsformatlbl
msgid "Format:"
msgstr ""
#: vpsr.rsformats
msgid "Formats:"
msgstr ""
@ -1031,6 +1035,10 @@ msgstr ""
msgid "Reminder"
msgstr ""
#: vpsr.rsreportsetup
msgid "Report setup"
msgstr ""
#: vpsr.rsresource
msgid "Resource"
msgstr ""

View File

@ -551,6 +551,10 @@ msgstr "Имя:"
msgid "Font..."
msgstr "Шрифт..."
#: vpsr.rsformatlbl
msgid "Format:"
msgstr ""
#: vpsr.rsformats
msgid "Formats:"
msgstr "Форматы:"
@ -1041,6 +1045,10 @@ msgstr "Повторение встречи:"
msgid "Reminder"
msgstr "Напоминание"
#: vpsr.rsreportsetup
msgid "Report setup"
msgstr ""
#: vpsr.rsresource
msgid "Resource"
msgstr "Ресурс"

View File

@ -409,6 +409,7 @@ resourcestring
{ Print Format Editor }
RSEditPrintFormat = 'Edit Print Formats...';
RSPrintFormatDesigner = 'Print format designer';
RSFormatLbl = 'Format:';
RSFormats = 'Formats:';
RSElements = 'Elements:';
RSNewBtn = 'New';
@ -419,6 +420,8 @@ resourcestring
RSLoadFileBtn = 'Load file...';
RSSaveFileBtn = 'Save file...';
RSReportSetup = 'Report setup';
{ Print Format Item Editor }
RSEditFormatCaption= 'Edit format';
RSNameLbl = 'Name:';