From 26e072eb99b32f8d1f81e798bfe1c0a288ab64eb Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 9 Oct 1997 15:27:15 +0000 Subject: [PATCH] ba1500.cpp Corretto programma di generazione delle chiavi di attivazione ba1500a.uml Messo flag di automagic sul campo F_DT (data odierna) git-svn-id: svn://10.65.10.50/trunk@5345 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba1500.cpp | 32 +++++++++++++++++++++++--------- ba/ba1500a.uml | 2 +- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/ba/ba1500.cpp b/ba/ba1500.cpp index 8aceaf9c6..a137e6062 100755 --- a/ba/ba1500.cpp +++ b/ba/ba1500.cpp @@ -150,7 +150,12 @@ bool TDongle::login() if (data[0] == 0xFAE8) _serno = data[1]; else - ok = FALSE; + { + if (_type == _user_key) + ok = FALSE; + else + _serno = 0; + } } if (ok) @@ -458,14 +463,20 @@ void TAttivazione_moduli::build_key_column() { TSheet_field& sf = (TSheet_field&)_msk->field(F_MODULI); sf.enable_column(F_KEY, FALSE); + + TString16 tmp; for (int i = sf.items()-1; i >= 0; i--) - { - TToken_string& riga = sf.row(i); - TString16 str; - int module = riga.get_int(2); - garble(module, str); - riga.add(str, 3); - } + { + if (!sf.cell_disabled(i, 1)) + { + TToken_string& riga = sf.row(i); + int module = riga.get_int(2); + garble(module, tmp); + riga.add(tmp, 3); + } + } + + sf.force_update(); } bool TAttivazione_moduli::burn_dongle() @@ -773,11 +784,12 @@ bool TAttivazione_moduli::create() _msk->set_handler(F_K2, decode_hnd); _msk->disable(F_K3); _msk->disable(F_K4); + + _msk->set_handler(F_SN, serno_hnd); _msk->enable(F_SN); sf.sheet_mask().field(F_ENABLE).set_handler(activate_hnd); build_sheet(FALSE); - build_key_column(); for (int i = un; i < MAX_AUT; i++) { @@ -791,6 +803,8 @@ bool TAttivazione_moduli::create() if (af>=40 && af<=46) sf.disable_cell(index,1); } + + build_key_column(); } break; default: diff --git a/ba/ba1500a.uml b/ba/ba1500a.uml index 4a251cbd4..e0dd8ef17 100755 --- a/ba/ba1500a.uml +++ b/ba/ba1500a.uml @@ -37,7 +37,7 @@ END DATE F_DT BEGIN PROMPT 56 2 "Data " - FLAGS "D" + FLAGS "AD" END STRING F_K3 16