Integrazione di SSA nel repository
Ora la versione DEMO permette di utilizzare il modulo base per consentire attivazione SSA git-svn-id: svn://10.65.10.50/branches/R_10_00@22613 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4dc843a0a2
commit
432bb34728
@ -319,10 +319,7 @@ bool TManutenzione_app::create() // initvar e arrmask
|
|||||||
if (_superprassi)
|
if (_superprassi)
|
||||||
{
|
{
|
||||||
const int type = ini_get_int(CONFIG_INSTALL, "Main", "Type");
|
const int type = ini_get_int(CONFIG_INSTALL, "Main", "Type");
|
||||||
if (type == 1 || type == 2)
|
_superprassi = (type == 1) || (type == 2)
|
||||||
_superprassi = true;
|
|
||||||
else
|
|
||||||
_superprassi = ini_get_bool(CONFIG_INSTALL, "Main", "TestDatabase");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc() > 2 && sw == "-C")
|
if (argc() > 2 && sw == "-C")
|
||||||
|
@ -505,22 +505,8 @@ bool TGeneric_table_app::valute_decimals_handler(TMask_field& f, KEY k)
|
|||||||
exc.set_decimals(dec);
|
exc.set_decimals(dec);
|
||||||
exc.set(exc.get());
|
exc.set(exc.get());
|
||||||
}
|
}
|
||||||
if (!m.is_running() && exc.empty())
|
|
||||||
exc.set(m.get(VAL_CHANGE_OLD));
|
|
||||||
}
|
}
|
||||||
if (k == K_ENTER)
|
return true;
|
||||||
{
|
|
||||||
TMask& m = f.mask();
|
|
||||||
real cambio(m.get(VAL_CHANGE));
|
|
||||||
if (cambio > ZERO && m.get_bool(VAL_INEURO))
|
|
||||||
{
|
|
||||||
// Se il cambio e' espresso in EURO metto in R10 il valore in lire
|
|
||||||
cambio = 1936.27 / cambio;
|
|
||||||
cambio.round(5);
|
|
||||||
}
|
|
||||||
m.set(VAL_CHANGE_OLD, cambio);
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TGeneric_table_app::change_decimals_handler(TMask_field& f, KEY k)
|
bool TGeneric_table_app::change_decimals_handler(TMask_field& f, KEY k)
|
||||||
|
@ -4,6 +4,5 @@
|
|||||||
#define VAL_DECIMALS_PRICES 111
|
#define VAL_DECIMALS_PRICES 111
|
||||||
#define VAL_DECIMALS_CHANGE 112
|
#define VAL_DECIMALS_CHANGE 112
|
||||||
#define VAL_CHANGE 121
|
#define VAL_CHANGE 121
|
||||||
#define VAL_CHANGE_OLD 122
|
|
||||||
#define VAL_LASTDATE 130
|
#define VAL_LASTDATE 130
|
||||||
#define VAL_EURO 131
|
#define VAL_EURO 131
|
||||||
|
@ -108,13 +108,6 @@ BEGIN
|
|||||||
WARINING "E' necessario specificare un cambio di riferimento"
|
WARINING "E' necessario specificare un cambio di riferimento"
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER VAL_CHANGE_OLD 15 5
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 80 "Cambio "
|
|
||||||
FIELD R10
|
|
||||||
FLAGS "D"
|
|
||||||
END
|
|
||||||
|
|
||||||
DATE VAL_LASTDATE
|
DATE VAL_LASTDATE
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 40 12 "Data "
|
PROMPT 40 12 "Data "
|
||||||
|
@ -97,13 +97,11 @@ void TAdvanced_property_sheet::edit()
|
|||||||
TFilename n = value.as_string();
|
TFilename n = value.as_string();
|
||||||
if (n.exist())
|
if (n.exist())
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
|
||||||
if (n.ends_with(".msk", true) || n.ends_with(".ini", true))
|
if (n.ends_with(".msk", true) || n.ends_with(".ini", true))
|
||||||
{
|
{
|
||||||
n.insert("notepad ");
|
n.insert("notepad ");
|
||||||
xvt_sys_execute(n, FALSE, FALSE);
|
xvt_sys_execute(n, FALSE, FALSE);
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
xvt_sys_goto_url(n, "open");
|
xvt_sys_goto_url(n, "open");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -255,7 +253,8 @@ KEY TProperty_sheet::run()
|
|||||||
|
|
||||||
TProperty_sheet::TProperty_sheet(const char* title, int width, int height)
|
TProperty_sheet::TProperty_sheet(const char* title, int width, int height)
|
||||||
{
|
{
|
||||||
_power = is_power_reseller();
|
const int nAssYear = xvt_vobj_get_attr(NULL_WIN, ATTR_APPL_VERSION_YEAR);
|
||||||
|
_power = nAssYear >= 2121;
|
||||||
if (_power)
|
if (_power)
|
||||||
_ps = new TAdvanced_property_sheet(title, width, height);
|
_ps = new TAdvanced_property_sheet(title, width, height);
|
||||||
else
|
else
|
||||||
|
@ -979,15 +979,8 @@ int TBaseisamfile::_write(const TRectype& rec)
|
|||||||
if (key.blank())
|
if (key.blank())
|
||||||
return _iskeyerr;
|
return _iskeyerr;
|
||||||
|
|
||||||
if (dongle().demo())
|
if (dongle().demo() && items() > 979L)
|
||||||
{
|
return _isfilefull;
|
||||||
const int logicnum = num();
|
|
||||||
if ((logicnum > LF_COMUNI && logicnum < LF_ANALISI) || logicnum > LF_RELANA)
|
|
||||||
{
|
|
||||||
if (items() > 979L)
|
|
||||||
return _isfilefull;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Forza l'uso della chiave principale (per chiavi duplicate?)
|
// Forza l'uso della chiave principale (per chiavi duplicate?)
|
||||||
const int fhnd = handle(_curr_key > 0 ? 1 : 0);
|
const int fhnd = handle(_curr_key > 0 ? 1 : 0);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define __KEYS_H
|
#define __KEYS_H
|
||||||
|
|
||||||
#ifndef XVT_INCL_DEFS
|
#ifndef XVT_INCL_DEFS
|
||||||
#include <xvt_defs.h>
|
#include "../xvaga/xvt_defs.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* @M */
|
/* @M */
|
||||||
|
@ -949,13 +949,6 @@ TPrefix::TPrefix() : _filelevel(0), _stdlevel(0), _items(0), _firm(NULL)
|
|||||||
if (!fexist(__ptprf) || strchr(__ptprf, ' ') != NULL)
|
if (!fexist(__ptprf) || strchr(__ptprf, ' ') != NULL)
|
||||||
fatal_box(FR("Percorso dati non valido: '%s'"), __ptprf);
|
fatal_box(FR("Percorso dati non valido: '%s'"), __ptprf);
|
||||||
|
|
||||||
if (dongle().demo())
|
|
||||||
{
|
|
||||||
const bool dati_demo = ini_get_bool(CONFIG_STUDIO, "Main", "Demo");
|
|
||||||
if (!dati_demo)
|
|
||||||
fatal_box(FR("Area dati '%s' non utilizzabile in DEMO!"), __ptprf);
|
|
||||||
}
|
|
||||||
|
|
||||||
const TFilename dir(prfx);
|
const TFilename dir(prfx);
|
||||||
long primaditta = atol(dir.name());
|
long primaditta = atol(dir.name());
|
||||||
if (primaditta > 0L && !exist(primaditta))
|
if (primaditta > 0L && !exist(primaditta))
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#ifndef __WIZARD_H
|
#ifndef __WIZARD_H
|
||||||
#define __WIZARD_H
|
#define __WIZARD_H
|
||||||
|
|
||||||
|
#ifndef __UTILS_H
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// CampoWizardPage
|
// CampoWizardPage
|
||||||
|
@ -46,4 +46,4 @@ wxString Theme();
|
|||||||
#define PRODUCT Product()
|
#define PRODUCT Product()
|
||||||
#define RESELLER Reseller()
|
#define RESELLER Reseller()
|
||||||
#define APPNAME Appname()
|
#define APPNAME Appname()
|
||||||
#define APPVERSION wxT("10.0")
|
#define APPVERSION wxT("11.0")
|
26
ssa/h/ssadll.h
Normal file
26
ssa/h/ssadll.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#ifndef SSADLL_H
|
||||||
|
#define SSADLL_H
|
||||||
|
|
||||||
|
#ifndef SSA_EXPORT
|
||||||
|
#define DECLSPEC __declspec(dllimport)
|
||||||
|
#else
|
||||||
|
#define DECLSPEC __declspec(dllexport)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
DECLSPEC const char* SSA_DecodificaUltimoErrore();
|
||||||
|
DECLSPEC int SSA_VerificaModulo(const char* prodotto, const char* modulo);
|
||||||
|
DECLSPEC int SSA_Login(const char* idClient, const char* prodotto);
|
||||||
|
DECLSPEC int SSA_ApriModulo(const char* idClient, const char* modulo);
|
||||||
|
DECLSPEC int SSA_ChiudiModulo(const char* idClient, const char* modulo);
|
||||||
|
DECLSPEC int SSA_Logout(const char* idClient, const char* prodotto);
|
||||||
|
DECLSPEC int SSA_Ping(const char* idClient);
|
||||||
|
|
||||||
|
DECLSPEC int SSA_XMLProdottiConfigurati(char* buf, int bufSize);
|
||||||
|
DECLSPEC int SSA_XMLUtentiCorrenti(char* buf, int bufSize);
|
||||||
|
DECLSPEC int SSA_Id(char* buf, int bufSize);
|
||||||
|
DECLSPEC int SSA_NumeroSerie(const char* prodotto);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
13
ssa/h/ssaerr.h
Normal file
13
ssa/h/ssaerr.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
#define SSA_OK 0 //ok
|
||||||
|
#define SSA_IDCLIENT_ERRATO -1 //idclient errato
|
||||||
|
#define SSA_NOTLOADED -100 //file di permessi non caricato (requisiti hw non verificati)
|
||||||
|
#define SSA_PROD_NOTFOUND -101 //prodotto non trovato
|
||||||
|
#define SSA_PROD_MAXUSERS -102 //raggiunto numero massimo di connessioni al prodotto
|
||||||
|
#define SSA_PROD_EXPDATE -103 //superata exp date prodotto
|
||||||
|
|
||||||
|
#define SSA_MOD_NOTFOUND -201 //modulo non trovato
|
||||||
|
#define SSA_MOD_MAXUSERS -202 //raggiunto numero massimo di connessioni al modulo
|
||||||
|
#define SSA_MOD_EXPDATE -203 //superata exp date modulo
|
||||||
|
|
||||||
|
#define SSA_UTENTE_NON_LOGGATO -301 //utente non loggato
|
7
ssa/moduli.txt
Normal file
7
ssa/moduli.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<PRODOTTO nome="PROVA" data-scad="2999-12-31" num-abilitazioni="-1" numero-serie="1234">
|
||||||
|
<MODULO nome="prova1" data-scad="2999-12-31" num-abilitazioni="1" />
|
||||||
|
<MODULO nome="prova2" data-scad="2999-12-31" num-abilitazioni="2" />
|
||||||
|
<MODULO nome="scaduto1" data-scad="2011-08-12" num-abilitazioni="2" />
|
||||||
|
</PRODOTTO>
|
||||||
|
<PRODOTTO nome="SCADUTO" data-scad="2011-08-12" num-abilitazioni="-1" numero-serie="9999">
|
||||||
|
</PRODOTTO>
|
BIN
ssa/release/SSAAgent.exe
Normal file
BIN
ssa/release/SSAAgent.exe
Normal file
Binary file not shown.
BIN
ssa/release/SSACreaLicenza.exe
Normal file
BIN
ssa/release/SSACreaLicenza.exe
Normal file
Binary file not shown.
BIN
ssa/release/SSADll.dll
Normal file
BIN
ssa/release/SSADll.dll
Normal file
Binary file not shown.
BIN
ssa/release/SSADll.lib
Normal file
BIN
ssa/release/SSADll.lib
Normal file
Binary file not shown.
BIN
ssa/release/SSAGetInfo.exe
Normal file
BIN
ssa/release/SSAGetInfo.exe
Normal file
Binary file not shown.
BIN
ssa/release/TestDll.exe
Normal file
BIN
ssa/release/TestDll.exe
Normal file
Binary file not shown.
BIN
ssa/sicurezza.V1.5.doc
Normal file
BIN
ssa/sicurezza.V1.5.doc
Normal file
Binary file not shown.
15
ssa/ssa.ini
Normal file
15
ssa/ssa.ini
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# LIVELLO DI DEBUG
|
||||||
|
# 0 = No debug
|
||||||
|
# 1 = Livello ERRORE
|
||||||
|
# 2 = Livello ERRORE + INFO
|
||||||
|
# 3 = Livello ERRORE + INFO + DEBUG
|
||||||
|
SSA-DEBUG=2
|
||||||
|
|
||||||
|
# ATTIVAZIONE MODALITA' CLIENT-SERVER
|
||||||
|
# IP_SERVER:PORTA
|
||||||
|
SSA-PORT=127.0.0.1:1234
|
||||||
|
|
||||||
|
#Tempo in secondi dopo il quale un utente puo' essere dichiarato scaduto
|
||||||
|
PING-MAXTIME=300
|
||||||
|
#Tempo in secondi ogni quanto pingare
|
||||||
|
PING-DELAY=60
|
23
ssa/test.bat
Normal file
23
ssa/test.bat
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
copy release\SsaDll.dll test\client
|
||||||
|
copy release\TestDll.exe test\client
|
||||||
|
copy release\SSAGetInfo.exe test\client
|
||||||
|
copy release\SSACreaLicenza.exe test\client
|
||||||
|
|
||||||
|
copy ssa.ini test\client
|
||||||
|
|
||||||
|
cd test\client
|
||||||
|
|
||||||
|
del ssa.log
|
||||||
|
|
||||||
|
rem -pause per farlo fermare
|
||||||
|
rem -dump per dumpare lo stato
|
||||||
|
rem -generalicenza per generare il file di licenze da zero
|
||||||
|
rem -loop n ripete il test n volte.
|
||||||
|
rem -sleep n dorme n secondi tra un loop e l'altro
|
||||||
|
|
||||||
|
rem TestDll.exe -pause -dump -generalicenza -loop 5
|
||||||
|
TestDll.exe -generalicenza -loop 10 -pause
|
||||||
|
|
||||||
|
pause
|
||||||
|
more ssa.log
|
||||||
|
cd..\..
|
24
ssa/testServer.bat
Normal file
24
ssa/testServer.bat
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
copy release\SsaDll.dll test\server
|
||||||
|
copy release\TestDll.exe test\server
|
||||||
|
copy release\SSAGetInfo.exe test\server
|
||||||
|
copy release\SSACreaLicenza.exe test\server
|
||||||
|
copy release\SSAAgent.exe test\server
|
||||||
|
|
||||||
|
copy ssa.ini test\server
|
||||||
|
|
||||||
|
cd test\server
|
||||||
|
|
||||||
|
del ssa.log
|
||||||
|
|
||||||
|
rem -pause per farlo fermare
|
||||||
|
rem -dump per dumpare lo stato
|
||||||
|
rem -generalicenza per generare il file di licenze da zero
|
||||||
|
rem -loop n ripete il test n volte.
|
||||||
|
rem -sleep n dorme n secondi tra un loop e l'altro
|
||||||
|
|
||||||
|
TestDll.exe -generalicenza -loop -1
|
||||||
|
SSAAgent.exe
|
||||||
|
|
||||||
|
pause
|
||||||
|
more ssa.log
|
||||||
|
cd..\..
|
@ -80,7 +80,10 @@ bool aga_unzip(const char* zipfile, const char* destdir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxZipInputStream fin(zipfile, strFileName);
|
wxFileInputStream file(zipfile);
|
||||||
|
wxZipInputStream fin(file);
|
||||||
|
wxZipEntry entry(strFileName);
|
||||||
|
fin.OpenEntry(entry);
|
||||||
|
|
||||||
wxString strOutFile = destdir;
|
wxString strOutFile = destdir;
|
||||||
if (!wxEndsWithPathSeparator(strOutFile) && !wxIsPathSeparator(strFileName[0]))
|
if (!wxEndsWithPathSeparator(strOutFile) && !wxIsPathSeparator(strFileName[0]))
|
||||||
|
@ -10,15 +10,8 @@
|
|||||||
#define WINVER 0x0500
|
#define WINVER 0x0500
|
||||||
#define STRICT
|
#define STRICT
|
||||||
#define WXUSINGDLL 1
|
#define WXUSINGDLL 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <wx/wxprec.h>
|
#include <wx/wxprec.h>
|
||||||
#else
|
|
||||||
#define _FILE_OFFSET_BITS 64
|
|
||||||
#define _LARGE_FILES
|
|
||||||
#define __WXGTK__
|
|
||||||
#define GTK_NO_CHECK_CASTS
|
|
||||||
#define _IODBC
|
|
||||||
#include <wx/wx.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#include "wxinc.h"
|
#include "wxinc.h"
|
||||||
#include "xvt.h"
|
#include "xvt.h"
|
||||||
|
|
||||||
#include "../../ssa/h/ssadll.h"
|
#include "../ssa/h/ssadll.h"
|
||||||
#include "../../ssa/h/ssaerr.h"
|
#include "../ssa/h/ssaerr.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
@ -251,18 +251,19 @@ TMessageBox::TMessageBox(wxWindow* pParent, const wxString& msg, int nStyle, int
|
|||||||
if (!bTerminalino)
|
if (!bTerminalino)
|
||||||
{
|
{
|
||||||
const int nAssYear = xvt_vobj_get_attr(NULL_WIN, ATTR_APPL_VERSION_YEAR);
|
const int nAssYear = xvt_vobj_get_attr(NULL_WIN, ATTR_APPL_VERSION_YEAR);
|
||||||
if (nAssYear > 2091)
|
if (nAssYear >= 2121)
|
||||||
{
|
{
|
||||||
const wxBitmap bmpCopy = wxArtProvider::GetBitmap(wxART_COPY, wxART_BUTTON);
|
const wxBitmap bmpCopy = wxArtProvider::GetBitmap(wxART_COPY, wxART_BUTTON);
|
||||||
wxBitmapButton* btnCopy = new wxBitmapButton(this, wxID_COPY, bmpCopy);
|
wxBitmapButton* btnCopy = new wxBitmapButton(this, wxID_COPY, bmpCopy);
|
||||||
pSmallSizer->Add(btnCopy, 0, wxALIGN_TOP);
|
pSmallSizer->Add(btnCopy, 0, wxALIGN_TOP);
|
||||||
|
/*
|
||||||
if (xvt_mail_installed())
|
if (xvt_mail_installed())
|
||||||
{
|
{
|
||||||
const wxBitmap bmpMail = wxArtProvider::GetBitmap("139", wxART_BUTTON, wxSize(bmpCopy.GetWidth(), bmpCopy.GetHeight()));
|
const wxBitmap bmpMail = wxArtProvider::GetBitmap("139", wxART_BUTTON, wxSize(bmpCopy.GetWidth(), bmpCopy.GetHeight()));
|
||||||
wxBitmapButton* btnMail = new wxBitmapButton(this, wxID_SAVEAS, bmpMail);
|
wxBitmapButton* btnMail = new wxBitmapButton(this, wxID_SAVEAS, bmpMail);
|
||||||
pSmallSizer->Add(btnMail, 0, wxALIGN_TOP);
|
pSmallSizer->Add(btnMail, 0, wxALIGN_TOP);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,14 +594,14 @@ void TwxWindow::OnChar(wxKeyEvent& evt)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WXK_NUMPAD_ADD: k = '+';break;
|
case WXK_NUMPAD_ADD: k = '+';break;
|
||||||
case WXK_DOWN : k = K_DOWN; break;
|
case WXK_DOWN : k = K_DOWN; break;
|
||||||
case WXK_END : k = K_LEND; break;
|
case WXK_END : k = K_LEND; break;
|
||||||
case WXK_HOME : k = K_LHOME; break;
|
case WXK_HOME : k = K_LHOME; break;
|
||||||
case WXK_LEFT : k = K_LEFT; break;
|
case WXK_LEFT : k = K_LEFT; break;
|
||||||
case WXK_NEXT : k = K_NEXT; break;
|
case WXK_PAGEDOWN : k = K_NEXT; break;
|
||||||
case WXK_PRIOR: k = K_PREV; break;
|
case WXK_PAGEUP : k = K_PREV; break;
|
||||||
case WXK_RIGHT: k = K_RIGHT; break;
|
case WXK_RIGHT : k = K_RIGHT; break;
|
||||||
case WXK_UP : k = K_UP; break;
|
case WXK_UP : k = K_UP; break;
|
||||||
case WXK_TAB:
|
case WXK_TAB:
|
||||||
if (evt.ShiftDown())
|
if (evt.ShiftDown())
|
||||||
k = K_BTAB;
|
k = K_BTAB;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user