Aggiunto programmino di prova invio messaggi (ba21)
git-svn-id: svn://10.65.10.50/trunk@599 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0e8c22f336
commit
72bb2ce629
8
ba/ba21.cpp
Executable file
8
ba/ba21.cpp
Executable file
@ -0,0 +1,8 @@
|
||||
#include <xvt.h>
|
||||
extern int test_messages(int argc, char** argv);
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// simple y claro
|
||||
return test_messages(argc, argv);
|
||||
}
|
13
ba/ba21.url
Executable file
13
ba/ba21.url
Executable file
@ -0,0 +1,13 @@
|
||||
#include <default.url>
|
||||
|
||||
MENU TASK_MENUBAR
|
||||
SUBMENU MENU_FILE "~File"
|
||||
ITEM BAR_ITEM(1) "~Selezione"
|
||||
|
||||
|
||||
MENUBAR MENU_BAR(1)
|
||||
|
||||
MENU MENU_BAR(1)
|
||||
SUBMENU MENU_FILE "~File"
|
||||
ITEM BAR_ITEM(1) "~Selezione"
|
||||
|
55
ba/ba2100.cpp
Executable file
55
ba/ba2100.cpp
Executable file
@ -0,0 +1,55 @@
|
||||
#include <applicat.h>
|
||||
#include <mask.h>
|
||||
#include <mailbox.h>
|
||||
#include <urldefid.h>
|
||||
#include "ba2100a.h"
|
||||
|
||||
class TestMessages : public TApplication
|
||||
{
|
||||
virtual bool menu(MENU_TAG);
|
||||
virtual bool create();
|
||||
public:
|
||||
TestMessages() : TApplication() {}
|
||||
virtual ~TestMessages() {}
|
||||
};
|
||||
|
||||
|
||||
bool TestMessages::create()
|
||||
{
|
||||
TApplication::create();
|
||||
dispatch_e_menu(BAR_ITEM(1));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool TestMessages::menu(MENU_TAG)
|
||||
{
|
||||
TMask m("ba2100a");
|
||||
TMailbox mb;
|
||||
|
||||
while (m.run() != K_ESC)
|
||||
{
|
||||
TString from(12);
|
||||
TString to(12);
|
||||
TString body(60);
|
||||
TString subj(12);
|
||||
|
||||
from = m.get(FLD_FROM);
|
||||
to = m.get(FLD_TO);
|
||||
body = m.get(FLD_BODY);
|
||||
subj = m.get(FLD_SUBJ);
|
||||
|
||||
TMessage msg(to, subj, body, from);
|
||||
mb.send(msg);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int test_messages(int argc, char** argv)
|
||||
{
|
||||
TestMessages app;
|
||||
app.run(argc, argv, "Prova invio messaggi");
|
||||
return 0;
|
||||
}
|
||||
|
4
ba/ba2100a.h
Executable file
4
ba/ba2100a.h
Executable file
@ -0,0 +1,4 @@
|
||||
#define FLD_FROM 101
|
||||
#define FLD_TO 102
|
||||
#define FLD_SUBJ 103
|
||||
#define FLD_BODY 104
|
37
ba/ba2100a.uml
Executable file
37
ba/ba2100a.uml
Executable file
@ -0,0 +1,37 @@
|
||||
#include "ba2100a.h"
|
||||
|
||||
PAGE "Invio messaggi" -1 -1 72 9
|
||||
|
||||
STRING FLD_FROM 10
|
||||
BEGIN
|
||||
PROMPT 1 2 "From "
|
||||
END
|
||||
|
||||
STRING FLD_TO 10
|
||||
BEGIN
|
||||
PROMPT 1 3 "To "
|
||||
END
|
||||
|
||||
STRING FLD_SUBJ 10
|
||||
BEGIN
|
||||
PROMPT 1 4 "Subject "
|
||||
END
|
||||
|
||||
STRING FLD_BODY 60
|
||||
BEGIN
|
||||
PROMPT 1 5 "Body "
|
||||
END
|
||||
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 9 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
Loading…
x
Reference in New Issue
Block a user