From 6199face53b01e704f037c65e02fc5125e933e69 Mon Sep 17 00:00:00 2001 From: cris Date: Mon, 29 Nov 2004 14:08:33 +0000 Subject: [PATCH] Patch level : 1.7 at Files correlati : at2.exe at2900a.msk Ricompilazione Demo : [ ] Commento : stampa lettere in lista frequenze git-svn-id: svn://10.65.10.50/trunk@12515 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- at/at2900.cpp | 24 +++++++++++++++++++++++- at/at2900a.h | 3 ++- at/at2900a.uml | 14 ++++++++++---- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/at/at2900.cpp b/at/at2900.cpp index fdf26d19d..8e5f0c530 100755 --- a/at/at2900.cpp +++ b/at/at2900.cpp @@ -17,7 +17,7 @@ #define ALIAS_TCS 200 #define ALIAS_COMDOM 501 // comune di domicilio -enum ts { undefined = 0, elenco = 1, etichette = 2, stampasufile = 3 }; +enum ts { undefined = 0, elenco = 1, etichette = 2, stampasufile = 3, lettere = 4 }; // definizione form per etichette class TEti_freq_form : public TForm @@ -43,6 +43,7 @@ class TFrequenza : public TPrintapp TExternisamfile* _file; TRecord_array* _sdonazioni; TEti_freq_form* _form_eti; + TEti_freq_form* _form_let; TAssoc_array _categorie; int _cur; TParagraph_string _cognome_nome, _dencom, _numdonsog, _dataultdon; @@ -130,6 +131,19 @@ void TFrequenza::set_page(int file, int cnt) } } break; + case lettere: + { + TPrint_section& corpo = _form_let->get_body(); + corpo.update(); + for (word i = 0; i < corpo.height(); i++) + { + TPrintrow& riga = corpo.row(i); + set_row(i+1,riga); + } + force_setpage(TRUE); // serve perchè alla prossima etichetta rifaccia la setpage + // altrimenti stampa sempre la stessa etichetta + } + break; case elenco: { if (_stampa80) @@ -322,6 +336,9 @@ bool TFrequenza::preprocess_page(int file, int counter) if (_tipostampa==etichette) if (printer().rows_left() < _form_eti->get_body().height()) printer().formfeed(); + if (_tipostampa==lettere) + if (printer().rows_left() < _form_let->get_body().height()) + printer().formfeed(); if (_tipostampa==stampasufile) { _file->zero(); @@ -411,6 +428,9 @@ bool TFrequenza::set_print(int m) case F_ETICHETTE: _tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined; break; + case F_LETTERE: + _tipostampa = (configura_stampante(p, "AT_LETTERE", "lettere")) ? lettere : undefined; + break; case F_FILE: { _tipostampa=stampasufile; @@ -568,11 +588,13 @@ bool TFrequenza::user_create() _etcolonne = config.get_int("EtColonne"); _form_eti = new TEti_freq_form(etformato); _stampa80 = config.get_bool("Stampa80"); + _form_let = new TEti_freq_form("ATLETTER"); return TRUE; } bool TFrequenza::user_destroy() { + delete _form_let; delete _form_eti; delete _sdonazioni; delete _donaz; diff --git a/at/at2900a.h b/at/at2900a.h index 06d51720a..456ff4bb3 100755 --- a/at/at2900a.h +++ b/at/at2900a.h @@ -43,4 +43,5 @@ #define F_ELENCO 401 #define F_ETICHETTE 402 -#define F_FILE 403 +#define F_LETTERE 403 +#define F_FILE 404 diff --git a/at/at2900a.uml b/at/at2900a.uml index 38ef9f3bb..ffcce7315 100755 --- a/at/at2900a.uml +++ b/at/at2900a.uml @@ -4,25 +4,31 @@ TOOLBAR "" 0 20 0 2 BUTTON F_ELENCO 9 2 BEGIN - PROMPT -14 -11 "E~lenco" + PROMPT -15 -11 "E~lenco" MESSAGE EXIT,F_ELENCO END BUTTON F_ETICHETTE 9 2 BEGIN - PROMPT -24 -11 "~Etichette" + PROMPT -25 -11 "~Etichette" MESSAGE EXIT,F_ETICHETTE END +BUTTON F_LETTERE 9 2 +BEGIN + PROMPT -35 -11 "~Lettere" + MESSAGE EXIT,F_LETTERE +END + BUTTON F_FILE 10 2 BEGIN - PROMPT -34 -11 "~File" + PROMPT -45 -11 "~File" MESSAGE EXIT,F_FILE END BUTTON DLG_QUIT 9 2 BEGIN - PROMPT -44 -11 "" + PROMPT -55 -11 "" END ENDPAGE