git-svn-id: svn://10.65.10.50/branches/R_10_00@23089 c028cbd2-c16b-5b4b-a496-9718f37d4682
75 lines
1.5 KiB
C++
Executable File
75 lines
1.5 KiB
C++
Executable File
#include <confapp.h>
|
|
|
|
#include "mgconf.h"
|
|
|
|
class TConf_magazz : public TConfig_application
|
|
{
|
|
char _current;
|
|
|
|
static bool check_fields(TMask_field& f, KEY k);
|
|
public:
|
|
// @cmember Disabilita la verifica del modulo in chiave
|
|
virtual bool check_autorization() const { return FALSE; }
|
|
|
|
virtual bool preprocess_config (TMask& mask, TConfig& config);
|
|
virtual bool postprocess_config (TMask& mask, TConfig& config);
|
|
virtual bool user_create( );
|
|
virtual bool user_destroy( );
|
|
|
|
TConf_magazz() : TConfig_application( CONFIG_DITTA ){ }
|
|
virtual ~TConf_magazz( ){ }
|
|
};
|
|
|
|
bool TConf_magazz::check_fields(TMask_field& f, KEY k)
|
|
{
|
|
return TRUE;
|
|
}
|
|
|
|
bool TConf_magazz::preprocess_config (TMask& mask, TConfig& config)
|
|
{
|
|
return TRUE;
|
|
}
|
|
|
|
bool TConf_magazz::postprocess_config (TMask& mask, TConfig& config)
|
|
{
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
bool TConf_magazz::user_create( )
|
|
{
|
|
const TFixed_string arg = argv(2);
|
|
if( arg[ 0 ] != '-' )
|
|
fatal_box( TR( "Usage: mg0 -2 -[1|2|3|4|5|6]") );
|
|
_current = arg[1];
|
|
|
|
TConfig conf(_current == '6' ? CONFIG_STUDIO : CONFIG_DITTA );
|
|
if (_current == '6') set_config(CONFIG_STUDIO);
|
|
switch( _current )
|
|
{
|
|
case '1':
|
|
conf.set( "EdMask", "mg0300a", "mg");
|
|
break;
|
|
case '2':
|
|
conf.set( "EdMask", "mg0300b", "mg" );
|
|
break;
|
|
default:
|
|
fatal_box( TR("Usage: mg0 -2 -[1|2|3|4|5|6]") );
|
|
return FALSE;
|
|
break;
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
bool TConf_magazz::user_destroy( )
|
|
{
|
|
return TRUE;
|
|
}
|
|
|
|
int mg0300(int argc, char* argv[])
|
|
{
|
|
TConf_magazz appc;
|
|
appc.run(argc, argv, TR("Parametri gestione magazzino"));
|
|
return 0;
|
|
}
|