56 lines
1.2 KiB
C++
Executable File
56 lines
1.2 KiB
C++
Executable File
#include <confapp.h>
|
|
#include <execp.h>
|
|
|
|
#include "sv0400a.h"
|
|
|
|
class TParametri_stat : public TConfig_application
|
|
{
|
|
bool _ask_update;
|
|
|
|
protected:
|
|
virtual bool postprocess_config_changed (const char*, const char*, const char*, const char*);
|
|
virtual bool user_create();
|
|
virtual bool user_destroy();
|
|
|
|
public:
|
|
TParametri_stat();
|
|
virtual ~TParametri_stat() { }
|
|
};
|
|
|
|
bool TParametri_stat::postprocess_config_changed (const char*, const char*, const char*, const char*)
|
|
{
|
|
return _ask_update = TRUE;
|
|
}
|
|
|
|
bool TParametri_stat::user_create()
|
|
{
|
|
TConfig cd(CONFIG_DITTA,"sv");
|
|
if (cd.get("EdMask").empty())
|
|
cd.set("EdMask","sv0400a","sv");
|
|
return TRUE;
|
|
}
|
|
|
|
bool TParametri_stat::user_destroy()
|
|
{
|
|
if (_ask_update)
|
|
{
|
|
bool recalc = yesno_box("Si desidera ricalcolare le statistiche ora?");
|
|
if (recalc)
|
|
{
|
|
TExternal_app app("sv2 -0");
|
|
app.run();
|
|
}
|
|
}
|
|
return TConfig_application::user_destroy();
|
|
}
|
|
|
|
TParametri_stat::TParametri_stat()
|
|
: TConfig_application(CONFIG_DITTA), _ask_update(FALSE)
|
|
{ }
|
|
|
|
int sv0400(int argc, char* argv[])
|
|
{
|
|
TParametri_stat app;
|
|
app.run(argc, argv, "Parametri statistiche");
|
|
return 0;
|
|
} |