Patch level : 10.0 462

Files correlati     : ve0.exe tutti i profili
Ricompilazione Demo : [ ]
Commento

Aggiunto pulsante email sui documenti


git-svn-id: svn://10.65.10.50/trunk@19413 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2009-10-09 10:13:07 +00:00
parent aa0630d885
commit c98dffca3b
4 changed files with 42 additions and 14 deletions

View File

@ -148,6 +148,7 @@ void TMotore_application::init_insert_mode( TMask& m )
m.disable(DLG_CONFERMA);
m.disable(DLG_PRINT);
m.disable(DLG_PREVIEW);
m.disable(DLG_EMAIL);
m.disable(DLG_ELABORA);
if (curdo.tipo().auto_add())
@ -173,6 +174,7 @@ void TMotore_application::init_modify_mode( TMask& m )
{
m.enable(DLG_CONFERMA);
m.disable(DLG_PRINT);
m.disable(DLG_EMAIL);
m.disable(DLG_PREVIEW);
enable_menu_item(M_FILE_PRINT, false);
enable_menu_item(M_FILE_PREVIEW, false);
@ -181,6 +183,7 @@ void TMotore_application::init_modify_mode( TMask& m )
{
m.disable(DLG_CONFERMA);
m.enable(DLG_PRINT, enable_print);
m.enable(DLG_EMAIL, enable_print);
m.enable(DLG_PREVIEW, enable_print);
enable_menu_item(M_FILE_PRINT, enable_print);
enable_menu_item(M_FILE_PREVIEW, enable_print);
@ -960,6 +963,7 @@ bool TMotore_application::save_and_print(bool savedoc, TPrtype mode)
commandline << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC) << ' ';
switch (mode)
{
case exportprinter: commandline << " E"; break;
case fileprinter: commandline << " P"; break;
case screenvis : commandline << " A"; break;
default : commandline << " S"; break;
@ -1005,6 +1009,11 @@ void TMotore_application::print()
save_and_print(true, winprinter);
}
void TMotore_application::mailto()
{
save_and_print(true, exportprinter);
}
void TMotore_application::preview()
{
save_and_print(true, screenvis);

View File

@ -52,8 +52,6 @@ protected:
virtual int write( const TMask& m );
virtual int rewrite( const TMask& m );
virtual bool remove();
virtual void print();
virtual void preview();
virtual bool has_filtered_cursor() const { return true; }
virtual TCursor& get_filtered_cursor() const;
virtual bool save_and_new() const;
@ -80,7 +78,12 @@ protected:
bool save_and_print(bool savedoc, TPrtype mode);
public:
virtual TRelation* get_relation( ) const { return _rel;}
virtual void print();
virtual void preview();
virtual void mailto();
virtual TRelation* get_relation( ) const { return _rel;}
// Funzioni di accesso alle variabili private

View File

@ -1511,9 +1511,16 @@ void TMask_generator::genera( const TString& profilo )
_m->message( "EXIT,20082" );
_m->end( );
_m->control( T_BOTTONE, DLG_EMAIL, 202 );
_m->begin( );
_m->prompt( 6, 1, "~Mail" );
_m->picture(TOOL_EMAIL);
_m->message( "EXIT,20082" );
_m->end( );
_m->control( T_BOTTONE, DLG_CONFERMA, 202 );
_m->begin( );
_m->prompt( 6, 1, "~Conferma");
_m->prompt( 7, 1, "~Conferma");
_m->picture(TOOL_OK);
_m->flag("D");
_m->end( );
@ -1524,35 +1531,35 @@ void TMask_generator::genera( const TString& profilo )
_m->control( T_BOTTONE, DLG_FIRSTREC, 202 );
_m->begin( );
_m->prompt( 7, 1, "Primo");
_m->prompt( 8, 1, "Primo");
_m->message( "EXIT,309" );
_m->picture(TOOL_FIRSTREC);
_m->end( );
_m->control( T_BOTTONE, DLG_PREVREC, 202 );
_m->begin( );
_m->prompt( 8, 1, "Indietro");
_m->prompt( 9, 1, "Indietro");
_m->message( "EXIT,305" );
_m->picture(TOOL_PREVREC);
_m->end( );
_m->control( T_BOTTONE, DLG_FINDREC, 202 );
_m->begin( );
_m->prompt( 9, 1, "Ri~cerca");
_m->prompt( 10, 1, "Ri~cerca");
_m->message( "EXIT,339" );
_m->picture(TOOL_FINDREC);
_m->end( );
_m->control( T_BOTTONE, DLG_NEXTREC, 202 );
_m->begin( );
_m->prompt( 10, 1, "Avanti");
_m->prompt( 11, 1, "Avanti");
_m->message( "EXIT,306" );
_m->picture(TOOL_NEXTREC);
_m->end( );
_m->control( T_BOTTONE, DLG_LASTREC, 202 );
_m->begin( );
_m->prompt( 11, 1 , "Ultimo");
_m->prompt( 12, 1 , "Ultimo");
_m->message( "EXIT,310" );
_m->picture(TOOL_LASTREC);
_m->end( );
@ -1572,7 +1579,7 @@ void TMask_generator::genera( const TString& profilo )
_m->control( T_BOTTONE, DLG_CANCEL, 202 );
_m->begin( );
_m->prompt( 13, 1, PR("Indietro") );
_m->prompt( 14, 1, PR("Indietro") );
_m->message( "EXIT,27" );
_m->end( );

View File

@ -177,6 +177,7 @@ TDocumento_mask::TDocumento_mask(const char* td)
set_handler( DLG_ELABORA, elabora_handler );
set_handler( DLG_PRINT, print_handler );
set_handler( DLG_PREVIEW, print_handler );
set_handler( DLG_EMAIL, print_handler );
set_handler( DLG_CONFERMA, confirm_handler );
const TString_array& handlers = tdoc.handlers();
@ -3246,10 +3247,18 @@ bool TDocumento_mask::print_handler( TMask_field& f, KEY key )
{
if (key == K_SPACE)
{
if (f.dlg() == DLG_PREVIEW)
main_app().preview();
else
main_app().print();
switch (f.dlg())
{
case DLG_EMAIL :
app().mailto();
break;
case DLG_PREVIEW :
app().preview();
break;
default :
app().print();
break;
}
}
return true;
}