campo-sirio/ba/bainst04.cpp
alex 449e913e3e Patch level :
Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Riportata la versione 98.01.03pl015


git-svn-id: svn://10.65.10.50/trunk@6574 c028cbd2-c16b-5b4b-a496-9718f37d4682
1998-04-30 14:38:35 +00:00

65 lines
1.2 KiB
C++
Executable File

#include <applicat.h>
#include <mask.h>
#include <config.h>
#include <utility.h>
#include <execp.h>
#include "bainst04.h"
class TInstall_AT : public TSkeleton_application
{
TMask * _m;
protected:
virtual void main_loop() ;
virtual bool set_ditta() ; // setta i dati ditta
virtual bool set_environment() ; //
public:
virtual ~TInstall_AT () {}
};
// setta i dati ditta
bool TInstall_AT ::set_ditta()
{
return TRUE;
}
bool TInstall_AT ::set_environment()
{
bool ok=TRUE;
if (_m->get_bool(F_USAMENUAVIS))
ok=fcopy("agaat.men","baprassi.men");
if (_m->get_bool(F_LOADTAB))
{
TExternal_app rice("bacnv 1 5 attab.txt");
ok &= (rice.run()==0);
}
return ok;
}
void TInstall_AT::main_loop()
{
TConfig ini("install.ini","at");
const bool primainst=ini.get("Versione").blank();
_m = new TMask ("bainst04.msk");
if (!primainst)
_m->disable(-G_DITTA); // campi ditta
else
_m->set(F_LOADTAB,"X");
_m->field(F_USAMENUAVIS).set("X");
if (_m->run()!=K_QUIT)
{
if (primainst)
{
set_ditta();
}
set_environment();
}
}
int bainst04(int argc, char** argv)
{
TInstall_AT app;
app.run(argc, argv, "Installazione Avis Provinciale");
return 0;
}