Patch level : 10.0
Files correlati : ba0.exe Ricompilazione Demo : [ ] Commento : Reso impossibile utilizzo di piu' istanze di cg6 git-svn-id: svn://10.65.10.50/trunk@20286 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
90e78afb05
commit
3dde4ba1f6
@ -1476,21 +1476,27 @@ bool TMenu_application::test_programs()
|
||||
|
||||
bool TMenu_application::user_create()
|
||||
{
|
||||
disable_menu_item(M_FILE_PRINT); // Questa voce di menu non serve per ora
|
||||
disable_menu_item(M_FILE_PRINT); // Questa voce di menu non serve per ora
|
||||
disable_menu_item(M_FILE_PREVIEW); // Figuriamoci questa
|
||||
|
||||
if (dongle().type() == _no_dongle)
|
||||
warning_box(TR("ATTENZIONE\nQuesto programma è in versione dimostrativa.\n"
|
||||
"Esso funzionera' per circa due ore al giorno con un numero limitato di registrazioni."));
|
||||
|
||||
if (!check_user())
|
||||
return false;
|
||||
|
||||
if (!TApplication::test_assistance_year())
|
||||
{
|
||||
TExternal_app app("ba1 -4");
|
||||
app.run();
|
||||
}
|
||||
|
||||
if (!yesno_box(TR("ATTENZIONE\nQuesto programma è in versione dimostrativa.\n"
|
||||
"Esso funzionera' con alcune limitazioni sulle registrazioni.\n"
|
||||
"Si desidera proseguire?")))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!TApplication::test_assistance_year())
|
||||
{
|
||||
TExternal_app app("ba1 -4");
|
||||
app.run();
|
||||
}
|
||||
if (!check_user())
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!test_programs())
|
||||
return false;
|
||||
|
||||
|
@ -281,11 +281,12 @@ bool TMenuitem::perform_submenu() const
|
||||
return ok;
|
||||
}
|
||||
|
||||
// Alcuni programmi devono essere eseguiti singolarmente: ba1, ba2, cg6
|
||||
bool TMenuitem::run_modal() const
|
||||
{
|
||||
bool yes = true;
|
||||
if (submenu().menu().mask_mode() == 3)
|
||||
yes = _action.match("ba[12] -*", true);
|
||||
yes = _action.match("ba[12] -*", true) || _action.starts_with("cg6", true);
|
||||
return yes;
|
||||
}
|
||||
|
||||
@ -324,10 +325,9 @@ bool TMenuitem::perform_program() const
|
||||
|
||||
if (_firm && main_app().get_firm() == 0)
|
||||
{
|
||||
if (dongle().demo())
|
||||
ok = menu().set_firm(1); // Forza la ditta 1
|
||||
else
|
||||
ok = menu().set_firm(0); // Chiede la ditta all'utente
|
||||
// Forza ditta 1 in demo altrimenti chiedila all'utente
|
||||
const int cd = dongle().demo() ? 1 : 0;
|
||||
ok = menu().set_firm(cd);
|
||||
}
|
||||
|
||||
if (ok)
|
||||
|
@ -70,11 +70,11 @@ static void build_xml_filename(TFilename& name, bool remote)
|
||||
xvt_sys_get_host_name(host, sizeof(host));
|
||||
name << host;
|
||||
name.replace(' ', '_');
|
||||
}
|
||||
if (remote)
|
||||
{
|
||||
const TDate oggi(TODAY);
|
||||
name << '_' << oggi.date2ansi();
|
||||
if (remote)
|
||||
{
|
||||
const TDate oggi(TODAY);
|
||||
name << '_' << oggi.date2ansi();
|
||||
}
|
||||
}
|
||||
name.ext("xml");
|
||||
}
|
||||
@ -140,6 +140,16 @@ static int is_active_firm(long codditta)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static TXmlItem& set_attr(TXmlItem& root, const char* name, const char* value)
|
||||
{
|
||||
TXmlItem& c = find_or_create_child(root, "attr");
|
||||
c.SetAttr("Name", name);
|
||||
|
||||
TString str = value; str.trim();
|
||||
c.SetAttr("Value", str);
|
||||
return c;
|
||||
}
|
||||
|
||||
// Salva o aggiorna il file xml coi dati di installazione
|
||||
bool save_campo_xml()
|
||||
{
|
||||
@ -150,15 +160,16 @@ bool save_campo_xml()
|
||||
root.SetTag("Campo");
|
||||
|
||||
TXmlItem& system = find_or_create_child(root, "system");
|
||||
char host[_MAX_PATH];
|
||||
xvt_sys_get_host_name(host, sizeof(host));
|
||||
system.SetAttr("Host", host);
|
||||
xvt_sys_get_user_name(host, sizeof(host));
|
||||
system.SetAttr("User", host);
|
||||
time_t t; time(&t);
|
||||
system.SetAttr("Time", ctime(&t));
|
||||
xvt_sys_get_version(host, NULL, sizeof(host));
|
||||
system.SetAttr("O.S.", host);
|
||||
|
||||
TFilename str;
|
||||
xvt_sys_get_host_name(str.get_buffer(), str.size());
|
||||
set_attr(system, "Host", str);
|
||||
xvt_sys_get_user_name(str.get_buffer(), str.size());
|
||||
set_attr(system, "User", str);
|
||||
time_t t; time(&t); str = ctime(&t);
|
||||
set_attr(system, "Time", str);
|
||||
xvt_sys_get_version(str.get_buffer(), NULL, str.size());
|
||||
set_attr(system, "O.S.", str);
|
||||
|
||||
TXmlItem& study = find_or_create_child(root, "study", true);
|
||||
TArray ditte; TPrefix::firms(ditte);
|
||||
@ -179,9 +190,8 @@ bool save_campo_xml()
|
||||
}
|
||||
}
|
||||
|
||||
xvt_sys_get_host_name(host, sizeof(host));
|
||||
study.SetAttr("DataPath", firm2dir(-1));
|
||||
study.SetAttr("ExePath", main_app().argv(0));
|
||||
set_attr(study, "DataPath", firm2dir(-1));
|
||||
set_attr(study, "ExePath", main_app().argv(0));
|
||||
|
||||
const TDongle& d = dongle();
|
||||
TXmlItem& chiavetta = find_or_create_child(root, "dongle", true);
|
||||
@ -193,10 +203,8 @@ bool save_campo_xml()
|
||||
{
|
||||
case _dongle_hardlock: chiavetta.SetAttr("Model", "Hardlock"); break;
|
||||
case _dongle_eutron : chiavetta.SetAttr("Model", "Eutron"); break;
|
||||
case _dongle_network :
|
||||
chiavetta.SetAttr("Model", "Network server");
|
||||
xvt_sys_get_profile_string(NULL, "Server", "Dongle", "", host, sizeof(host));
|
||||
chiavetta.SetAttr("Server", host);
|
||||
case _dongle_network : chiavetta.SetAttr("Model", "Network server");
|
||||
chiavetta.SetAttr("Server", d.server_name());
|
||||
break;
|
||||
default: chiavetta.SetAttr("Model", "Unknown"); break;
|
||||
}
|
||||
@ -225,7 +233,7 @@ bool send_campo_xml()
|
||||
{
|
||||
TWait_cursor waiter;
|
||||
bool ok = save_campo_xml();
|
||||
if (ok && (xvt_net_get_status() & 0x4) && !is_power_station())
|
||||
if (ok && (xvt_net_get_status() & 0x4) != 0)
|
||||
{
|
||||
TSocketClient aga;
|
||||
CONNID id = aga.QueryConnection("21", "www.aga.it");
|
||||
|
@ -929,12 +929,18 @@ bool TAttivazione_moduli::test_assistance_year() const
|
||||
|
||||
bool TAttivazione_moduli::create()
|
||||
{
|
||||
bool ok = ::dongle().login(true);
|
||||
TDongle& d = dongle();
|
||||
bool ok = d.login(true);
|
||||
if (!ok)
|
||||
return false;
|
||||
|
||||
if (::dongle().hardware() == _dongle_network)
|
||||
return error_box(TR("Questo programma non puo' funzionare mentre e' in funzione il server di autorizzazioni"));
|
||||
if (d.hardware() == _dongle_network)
|
||||
{
|
||||
if (is_power_station())
|
||||
warning_box(TR("Non è consigliabile usare questo programma mentre e' in funzione il server di autorizzazioni"));
|
||||
else
|
||||
return error_box(TR("Questo programma non puo' funzionare mentre e' in funzione il server di autorizzazioni"));
|
||||
}
|
||||
|
||||
ok = TApplication::test_assistance_year();
|
||||
if (!ok)
|
||||
|
@ -32,21 +32,7 @@
|
||||
// Metodi di utility
|
||||
///////////////////////////////////////////////////////
|
||||
HIDDEN const TString& http_default_path()
|
||||
{
|
||||
//nuovo modo di gettare il producer da oem.ini
|
||||
TConfig oemini(CONFIG_OEM, "MAIN");
|
||||
const int oem = oemini.get_int("OEM", NULL, -1, -1);
|
||||
TString& tmp = get_tmp_string();
|
||||
if (oem >= 0)
|
||||
{
|
||||
TString8 para; para << "OEM_" << oem;
|
||||
tmp = oemini.get("Web", para);
|
||||
}
|
||||
if (tmp.blank())
|
||||
tmp = "www.aga.it/release100/";
|
||||
|
||||
return tmp;
|
||||
}
|
||||
{ return get_oem_info("Web", "www.aga.it/release100/");}
|
||||
|
||||
HIDDEN int compare_version(const char* v1, int p1, const char* v2, int p2)
|
||||
{
|
||||
|
@ -81,7 +81,7 @@ bool TCond_pag_app::user_create()
|
||||
_interv_rate = 30;
|
||||
_pag = NULL;
|
||||
_msk = new TMask("ba3700a");
|
||||
_cs = &((TSheet_field&)_msk->field(F_SHEET_RPG));
|
||||
_cs = &_msk->sfield(F_SHEET_RPG));
|
||||
_cs->set_notify(sheet_action);
|
||||
|
||||
_msk->set_handler (F_INT_RATE , intervallo_rate);
|
||||
|
Loading…
x
Reference in New Issue
Block a user