Corrette le create delle TApplication
git-svn-id: svn://10.65.10.50/trunk@736 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
74197d129b
commit
034dfd861c
@ -515,6 +515,7 @@ bool TMenu_application::check_user()
|
||||
|
||||
bool TMenu_application::create()
|
||||
{
|
||||
TApplication::create();
|
||||
if (!check_user()) return FALSE;
|
||||
set_perms();
|
||||
test_temp();
|
||||
|
@ -32,6 +32,5 @@ MENUBAR MENU_BAR(4)
|
||||
|
||||
MENU MENU_BAR(4)
|
||||
SUBMENU MENU_FILE "~File"
|
||||
ITEM BAR_ITEM(1) "~Attiva"
|
||||
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <applicat.h>
|
||||
#include <utility.h>
|
||||
#include <prefix.h>
|
||||
#include <isam.h>
|
||||
#include <mask.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
#include <validate.h>
|
||||
#include <xvtility.h>
|
||||
|
||||
#include "ba1.h"
|
||||
#include "ba1100.h"
|
||||
@ -101,6 +100,8 @@ void BA1100_application::print()
|
||||
bool BA1100_application::create() // initvar e arrmask
|
||||
|
||||
{
|
||||
TApplication::create();
|
||||
|
||||
_firm = get_firm();
|
||||
|
||||
if (argc() > 2)
|
||||
@ -127,7 +128,7 @@ bool BA1100_application::destroy() // releasev e arrmask
|
||||
if (_firm) set_firm(_firm);
|
||||
if (_browse != NULL) delete _browse;
|
||||
if (_mask != NULL) delete _mask;
|
||||
return TRUE ;
|
||||
return TApplication::destroy() ;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <applicat.h>
|
||||
#include <xvtility.h>
|
||||
#include <utility.h>
|
||||
#include <prefix.h>
|
||||
#include <mask.h>
|
||||
#include <isam.h>
|
||||
#include <sheet.h>
|
||||
#include <mask.h>
|
||||
#include <progind.h>
|
||||
#include <sheet.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
#include <validate.h>
|
||||
|
||||
#include "ba1.h"
|
||||
@ -53,6 +51,8 @@ HIDDEN bool seq_handler(TMask_field& f, KEY key)
|
||||
bool BA1300_application::create() // initvar e arrmask
|
||||
|
||||
{
|
||||
TApplication::create();
|
||||
|
||||
_firm = get_firm();
|
||||
|
||||
if (argc() > 2)
|
||||
@ -75,7 +75,7 @@ bool BA1300_application::destroy() // releasev e arrmask
|
||||
if (_firm) set_firm(_firm);
|
||||
if (_testsheet != NULL) delete _testsheet;
|
||||
if (_mask != NULL) delete _mask;
|
||||
return TRUE ;
|
||||
return TApplication::destroy() ;
|
||||
}
|
||||
|
||||
TArray_sheet * BA1300_application::field_sheet(TMask * m)
|
||||
|
@ -17,7 +17,7 @@
|
||||
#define UBYTEMASK 0xFF00
|
||||
#define MAXAUT 49
|
||||
|
||||
enum kt { _user_key, _aga_key, _prassi_key};
|
||||
enum KeyType { _user_key, _aga_key, _prassi_key};
|
||||
|
||||
#define BITTEST(w,p) (((w) & (0x0001 << (p))) != 0)
|
||||
#define BITSET(w,p,v) ((v) ? ((w) |= (0x0001 << (p))) : ((w) &= (~(0x0001 << (p)))))
|
||||
@ -26,15 +26,16 @@ class TAttivazione_moduli : public TApplication
|
||||
{
|
||||
TMask* _msk;
|
||||
|
||||
kt _key_type;
|
||||
KeyType _key_type;
|
||||
word _serno;
|
||||
word _port;
|
||||
|
||||
virtual bool create() ;
|
||||
virtual bool destroy() ;
|
||||
bool menu(MENU_TAG);
|
||||
void generate_key();
|
||||
virtual bool use_files() const { return FALSE; }
|
||||
virtual bool menu(MENU_TAG);
|
||||
|
||||
void generate_key();
|
||||
static void keyext(const TString & s, word * v);
|
||||
static bool user_hnd(TMask_field & f, KEY k);
|
||||
static bool decode_hnd(TMask_field & f, KEY k);
|
||||
@ -293,6 +294,10 @@ bool TAttivazione_moduli::create()
|
||||
if (user() != "PRASSI")
|
||||
return error_box("Utente non abilitato all'uso di questo programma");
|
||||
|
||||
disable_menu_item(M_FILE_NEW);
|
||||
disable_menu_item(M_FILE_REVERT);
|
||||
disable_menu_item(M_FILE_PG_SETUP);
|
||||
|
||||
_msk = new TMask("ba1500a") ;
|
||||
#if XVT_OS == XVT_OS_SCOUNIX
|
||||
if (Hl_Port(AGAADR) != 0)
|
||||
@ -314,6 +319,7 @@ bool TAttivazione_moduli::create()
|
||||
HL_LOGOUT();
|
||||
HL_LOGIN(USERADR, DONT_CARE, REFKEY, VERKEY);
|
||||
#endif
|
||||
|
||||
switch (_key_type)
|
||||
{
|
||||
case _user_key:
|
||||
|
@ -381,6 +381,7 @@ bool BA3200_application::preprocess_print(int file, int counter)
|
||||
set_headers();
|
||||
set_footers();
|
||||
set_translations();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool BA3200_application::user_destroy()
|
||||
|
@ -1,6 +1,4 @@
|
||||
#include <applicat.h>
|
||||
#include <date.h>
|
||||
#include <lffiles.h>
|
||||
#include <mask.h>
|
||||
#include <isam.h>
|
||||
#include <sheet.h>
|
||||
|
@ -33,6 +33,8 @@ public:
|
||||
|
||||
bool TConversione_archivi::create()
|
||||
{
|
||||
TApplication::create();
|
||||
|
||||
if (argc() < 3)
|
||||
{
|
||||
_error = 101;
|
||||
@ -170,4 +172,3 @@ int main(int argc,char** argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user