cg0200.cpp Trasformato in golem il messaggio da spedire via fax

Aggiunta gestione posta elettronica
cg0200a.uml  Aggiunto bottone di posta elettronica


git-svn-id: svn://10.65.10.50/trunk@5645 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1997-11-20 07:58:37 +00:00
parent 368f2e0edb
commit 3ff0f077de
2 changed files with 41 additions and 18 deletions

View File

@ -63,6 +63,7 @@ protected:
static bool tipo_handler(TMask_field& f, KEY key); static bool tipo_handler(TMask_field& f, KEY key);
static bool percip_handler(TMask_field& f, KEY key); static bool percip_handler(TMask_field& f, KEY key);
static bool fax_handler(TMask_field& f, KEY k); static bool fax_handler(TMask_field& f, KEY k);
static bool email_handler(TMask_field& f, KEY k);
static bool rsoc_handler(TMask_field& f, KEY k); static bool rsoc_handler(TMask_field& f, KEY k);
public: public:
@ -293,10 +294,14 @@ bool TClifo_application::fax_handler(TMask_field& f, KEY k)
bool ok = TRUE; bool ok = TRUE;
if (k == K_SPACE) if (k == K_SPACE)
{ {
TConfig ini(CONFIG_USER, "Link"); // TConfig ini(CONFIG_USER, "Link");
TFilename editor = ini.get("Editor", NULL, -1, "notepad"); // TFilename editor = ini.get("Editor", NULL, -1, "notepad");
TExternal_app app(editor); // TExternal_app app(editor);
ok = app.run(TRUE, FALSE) == 0; // ok = app.run(TRUE, FALSE) == 0;
TFilename msg; msg.temp(NULL, "txt");
ofstream msgf(msg); msgf.close();
goto_url(msg);
if (ok) if (ok)
{ {
const TMask& m = f.mask(); const TMask& m = f.mask();
@ -312,6 +317,17 @@ bool TClifo_application::fax_handler(TMask_field& f, KEY k)
return ok; return ok;
} }
bool TClifo_application::email_handler(TMask_field& f, KEY k)
{
if (k == K_SPACE)
{
TMail_message msg(f.mask().get(F_MAIL));
msg.send();
}
return TRUE;
}
bool TClifo_application::rsoc_handler(TMask_field& f, KEY k) bool TClifo_application::rsoc_handler(TMask_field& f, KEY k)
{ {
if (k == K_TAB && f.focusdirty()) if (k == K_TAB && f.focusdirty())
@ -638,6 +654,7 @@ bool TClifo_application::user_create() // initvar e arrmask
_msk->set_handler(F_ALLEG, alleg_handler); _msk->set_handler(F_ALLEG, alleg_handler);
_msk->set_handler(F_CODALLEG, codalleg_handler); _msk->set_handler(F_CODALLEG, codalleg_handler);
_msk->set_handler(DLG_FAX, fax_handler); _msk->set_handler(DLG_FAX, fax_handler);
_msk->set_handler(DLG_EMAIL, email_handler);
_msk->set_handler(F_RAGSOC, rsoc_handler); _msk->set_handler(F_RAGSOC, rsoc_handler);
TSheet_field& ind = (TSheet_field&) _msk->field(F_SHEET_G_VEN); TSheet_field& ind = (TSheet_field&) _msk->field(F_SHEET_G_VEN);

View File

@ -1,6 +1,25 @@
#include "cg0200.h" #include "cg0200.h"
TOOLBAR "" 0 20 0 2 TOOLBAR "" 0 18 0 4
BUTTON DLG_FAX 10 2
BEGIN
PROMPT -46 -3 "Fa~x"
PICTURE BMP_FAX
END
BUTTON DLG_EMAIL 10 2
BEGIN
PROMPT -56 -3 "~Posta"
PICTURE BMP_EMAIL
END
GOLEM DLG_OGGETTI 10 2
BEGIN
PROMPT -66 -3 ""
FIELD OGGETTI
FLAGS "M"
END
#include <toolbar.h> #include <toolbar.h>
@ -333,19 +352,6 @@ FIELD SOSPESO
HELP "Indicare se il C/F e' movimentato ma non piu' utilizzabile" HELP "Indicare se il C/F e' movimentato ma non piu' utilizzabile"
END END
GOLEM DLG_OGGETTI 4 2
BEGIN
PROMPT -12 -1 ""
FIELD OGGETTI
FLAGS "M"
END
BUTTON DLG_FAX 10 2
BEGIN
PROMPT -22 -1 "Fa~x"
PICTURE BMP_FAX
END
LIST DLG_NULL 1 LIST DLG_NULL 1
BEGIN BEGIN
PROMPT 80 80 "" PROMPT 80 80 ""