Patch level : 10.0
Files correlati : ba8.exe ba8700a.msk bamenu.men Ricompilazione Demo : [ ] Commento : Aggiunti programma e relativa maschera per l'immisione dei parametri per la firma digitale di ogni singolo utente git-svn-id: svn://10.65.10.50/trunk@18752 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9244038ce3
commit
2dd2aeb2a3
@ -119,21 +119,6 @@ void TBook_window::update()
|
||||
_logo.draw(win(), rctw, 'C', 'B', '-');
|
||||
const PNT pnt = { 0, 0 };
|
||||
draw_spider(win(), 0x3, pnt);
|
||||
|
||||
const TDate oggi(TODAY);
|
||||
if (oggi.day() == 1 && oggi.month() == 4)
|
||||
{
|
||||
hide_brush();
|
||||
RCT r = rctw;
|
||||
r.left = rctw.right/16;
|
||||
r.top = rctw.bottom / 2 - rctw.right/8;
|
||||
r.bottom = rctw.bottom / 2 + rctw.right/8;
|
||||
set_pen(COLOR_RED, 3);
|
||||
xvt_dwin_draw_oval(win(), &r);
|
||||
r.right = r.left;
|
||||
r.left = -r.left;
|
||||
xvt_dwin_draw_arc(win(), &r, (r.left+r.right)/2, r.bottom, (r.left+r.right)/2, r.top);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1017,12 +1017,16 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
|
||||
// DECOMPRESSIONE
|
||||
// ----------------
|
||||
// viene decompresso il file .zip collegato al file remote_ini (es. ba0883a1.zip, bainst.zip)
|
||||
msg = TR("Decompressione");
|
||||
if (is_a_patch)
|
||||
msg << TR(" della patch ") << patchlevel ;
|
||||
msg << TR(" del modulo '") << module << TR("' in corso...");
|
||||
|
||||
TProgind pi(dischi, msg, false, true);
|
||||
TProgind* pi = NULL;
|
||||
if (dischi > 1)
|
||||
{
|
||||
msg = TR("Decompressione");
|
||||
if (is_a_patch)
|
||||
msg << TR(" della patch ") << patchlevel ;
|
||||
msg << TR(" del modulo '") << module << TR("' in corso...");
|
||||
pi = new TProgind(dischi, msg, false, true);
|
||||
}
|
||||
|
||||
TFilename tempdir;
|
||||
tempdir.tempdir();
|
||||
@ -1081,6 +1085,11 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
|
||||
if (ok)
|
||||
::fcopy(chunk, totti, d > 1); // Somma il chunk al totale
|
||||
}
|
||||
if (pi != NULL)
|
||||
{
|
||||
delete pi;
|
||||
pi = NULL;
|
||||
}
|
||||
|
||||
//scompattamento vero e proprio dello zip
|
||||
aga_unzip(totti, tempdir); // Scompatta il file totale zip
|
||||
@ -1114,9 +1123,10 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
|
||||
|
||||
if (ok)
|
||||
{
|
||||
TWait_cursor hourglass;
|
||||
msg.cut(0);
|
||||
msg << TR("Aggiornamento del modulo '") << module << TR("' in corso...");
|
||||
pi.set_text(msg);
|
||||
xvtil_statbar_set(msg);
|
||||
ok = move_module(module, *remote_ini, true);
|
||||
|
||||
if (ok)
|
||||
@ -1145,6 +1155,7 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
|
||||
}
|
||||
}
|
||||
}
|
||||
xvtil_statbar_set("");
|
||||
} //if(ok)..
|
||||
} //if(ok)..
|
||||
if (ok) // marca sull'install.ini di destinazione l'avvenuta installazione del modulo
|
||||
|
19
ba/ba5.cpp
19
ba/ba5.cpp
@ -1,29 +1,18 @@
|
||||
#include <xvt.h>
|
||||
#include <strings.h>
|
||||
#include <checks.h>
|
||||
|
||||
#include "ba5.h"
|
||||
|
||||
#define usage "Error - usage : %s -{0|1|2}"
|
||||
|
||||
int main(int argc,char** argv)
|
||||
|
||||
{
|
||||
int rt = -1 ;
|
||||
int rt = -1 ;
|
||||
const int r = (argc > 1) ? atoi(&argv[1][1]) : -1;
|
||||
|
||||
switch (r)
|
||||
{
|
||||
case 0:
|
||||
rt = ba5100(argc,argv) ; break; // ricerca soci
|
||||
case 1:
|
||||
rt = ba5200(argc,argv) ; break; // Gestione registri
|
||||
case 2:
|
||||
rt = ba5300(argc,argv) ; break; // ricezione ABI/CAB
|
||||
default:
|
||||
error_box(usage, argv[0]) ; break;
|
||||
case 1: rt = ba5200(argc,argv); break; // Gestione registri
|
||||
case 2: rt = ba5300(argc,argv); break; // ricezione ABI/CAB
|
||||
default: rt = ba5100(argc,argv); break; // ricerca soci
|
||||
}
|
||||
exit(rt);
|
||||
return rt;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@ int main(int argc, char** argv)
|
||||
case 3: ba8400(argc, argv); break; // Form Converter
|
||||
case 4: ba8500(argc, argv); break; // Report Printer
|
||||
case 5: ba8600(argc, argv); break; // Ricerca documenti archiviati
|
||||
case 6: ba8700(argc, argv); break; // Firma digitale
|
||||
default: ba8300(argc, argv); break; // Report Generator
|
||||
}
|
||||
return 0;
|
||||
|
1
ba/ba8.h
1
ba/ba8.h
@ -4,5 +4,6 @@ int ba8300(int argc, char* argv[]);
|
||||
int ba8400(int argc, char* argv[]);
|
||||
int ba8500(int argc, char* argv[]);
|
||||
int ba8600(int argc, char* argv[]);
|
||||
int ba8700(int argc, char* argv[]);
|
||||
|
||||
|
||||
|
121
ba/ba8700.cpp
Executable file
121
ba/ba8700.cpp
Executable file
@ -0,0 +1,121 @@
|
||||
#include "ba8.h"
|
||||
#include "ba8700a.h"
|
||||
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <config.h>
|
||||
#include <dongle.h>
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TSignature_mask
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TSignature_mask : public TAutomask
|
||||
{
|
||||
TString _host, _user;
|
||||
bool _admin;
|
||||
|
||||
protected:
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
|
||||
public:
|
||||
void load();
|
||||
void save();
|
||||
|
||||
TSignature_mask();
|
||||
};
|
||||
|
||||
bool TSignature_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
{
|
||||
case F_LIST:
|
||||
if (e == se_query_add || e == se_query_del)
|
||||
return _admin;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void TSignature_mask::load()
|
||||
{
|
||||
TConfig ini(CONFIG_WST, "fd");
|
||||
TAssoc_array& ass = ini.list_variables();
|
||||
|
||||
TSheet_field& sheet = sfield(F_LIST);
|
||||
FOR_EACH_ASSOC_STRING(ass, h, key, val)
|
||||
{
|
||||
if (_admin || _user.compare(key, -1, true) == 0)
|
||||
{
|
||||
TToken_string& row = sheet.row(-1);
|
||||
row = key; // "Cert_USER"
|
||||
row.ltrim(5); // remove "Cert_"
|
||||
row.add(val); // add "pkxxx.dll,certificate"
|
||||
row.replace(',', row.separator());
|
||||
}
|
||||
}
|
||||
sheet.sort();
|
||||
}
|
||||
|
||||
void TSignature_mask::save()
|
||||
{
|
||||
TConfig ini(CONFIG_WST, "fd");
|
||||
|
||||
if (_admin)
|
||||
ini.remove_all();
|
||||
|
||||
TSheet_field& sheet = sfield(F_LIST);
|
||||
TString u, f, c;
|
||||
FOR_EACH_SHEET_ROW(sheet, i, row)
|
||||
{
|
||||
row->get(0, u);
|
||||
if (u.full())
|
||||
{
|
||||
u.insert("Cert_");
|
||||
row->get(1, f);
|
||||
row->get(2, c);
|
||||
if (c.full())
|
||||
f << ',' << c;
|
||||
ini.set(u, f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TSignature_mask::TSignature_mask() : TAutomask("ba8700a")
|
||||
{
|
||||
_admin = user() == dongle().administrator();
|
||||
xvt_sys_get_host_name(_host.get_buffer(), _host.size());
|
||||
xvt_sys_get_user_name(_user.get_buffer(), _user.size());
|
||||
set(F_HOST, _host);
|
||||
set(F_NAME, _user);
|
||||
load();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TSignature_app
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TSignature_app : public TSkeleton_application
|
||||
{
|
||||
protected:
|
||||
virtual const char* extra_modules() const { return "fd"; }
|
||||
|
||||
public:
|
||||
virtual void main_loop();
|
||||
};
|
||||
|
||||
void TSignature_app::main_loop()
|
||||
{
|
||||
TSignature_mask m;
|
||||
while (m.run() == K_ENTER)
|
||||
m.save();
|
||||
}
|
||||
|
||||
int ba8700(int argc, char* argv[])
|
||||
{
|
||||
TSignature_app app;
|
||||
app.run(argc, argv, TR("Firma digitale"));
|
||||
return 0;
|
||||
}
|
7
ba/ba8700a.h
Executable file
7
ba/ba8700a.h
Executable file
@ -0,0 +1,7 @@
|
||||
#define F_HOST 201
|
||||
#define F_NAME 202
|
||||
#define F_LIST 203
|
||||
|
||||
#define F_USER 101
|
||||
#define F_FILE 102
|
||||
#define F_CERT 103
|
87
ba/ba8700a.uml
Executable file
87
ba/ba8700a.uml
Executable file
@ -0,0 +1,87 @@
|
||||
#include "ba8700a.h"
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
|
||||
BUTTON DLG_OK 2 2
|
||||
BEGIN
|
||||
PROMPT 1 1 "Salva"
|
||||
PICTURE TOOL_SAVEREC
|
||||
END
|
||||
|
||||
#include <helpbar.h>
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Firma digitale" 0 2 0 0
|
||||
|
||||
GROUPBOX DLG_NULL 78 3
|
||||
BEGIN
|
||||
PROMPT 1 0 "@bParametri"
|
||||
END
|
||||
|
||||
STRING F_HOST 256 32
|
||||
BEGIN
|
||||
PROMPT 2 1 "Stazione "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_NAME 80 24
|
||||
BEGIN
|
||||
PROMPT 46 1 "Utente "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
SPREADSHEET F_LIST
|
||||
BEGIN
|
||||
PROMPT 0 3 ""
|
||||
ITEM "Utente@16"
|
||||
ITEM "File certificato o DLL@60"
|
||||
ITEM "Nome certificato@32"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
PAGE "Parametri" -1 -1 78 6
|
||||
|
||||
STRING F_USER 32 16
|
||||
BEGIN
|
||||
PROMPT 1 1 "Utente "
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_FILE 260 40
|
||||
BEGIN
|
||||
PROMPT 1 2 "File PFX o DLL "
|
||||
CHECKTYPE REQUIRED
|
||||
FSELECT "*"
|
||||
FLAGS "M"
|
||||
END
|
||||
|
||||
STRING F_CERT 80 40
|
||||
BEGIN
|
||||
PROMPT 1 3 "Certificato "
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
|
||||
BUTTON DLG_OK 2 2
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_DELREC 2 2
|
||||
BEGIN
|
||||
PROMPT 2 1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 2 2
|
||||
BEGIN
|
||||
PROMPT 3 1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
@ -97,6 +97,7 @@ Item_01 = "Generatore query", "ba8 -1", "S"
|
||||
Item_02 = "Generatore report", "ba8 -2", "S", 10217
|
||||
Item_03 = "Convertitore da form a report", "ba8 -3", ""
|
||||
Item_04 = "Ricerca file archiviati", "ba8 -5", ""
|
||||
Item_05 = "Firma digitale", "ba8 -6", ""
|
||||
|
||||
[MENU_015]
|
||||
Caption = "Manutenzione"
|
||||
|
Loading…
x
Reference in New Issue
Block a user