Patch level : 2.0 nopatch

Files correlati     : ba0.exe
Ricompilazione Demo : [ ]
Commento            :

Migliorata gestione di ba0close.exe


git-svn-id: svn://10.65.10.50/trunk@11227 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-06-11 11:02:13 +00:00
parent 2b68cb81ae
commit 7c73bdacd7
4 changed files with 64 additions and 11 deletions

View File

@ -62,6 +62,7 @@ protected: // TApplication
virtual bool test_assistance_year() const;
protected:
void deconnect_user();
virtual void main_loop();
void test_temp();
@ -937,17 +938,22 @@ bool TMenu_application::create()
return TRUE;
}
bool TMenu_application::destroy()
{
void TMenu_application::deconnect_user()
{
TLocalisamfile users(LF_USER);
users.put("USERNAME", user());
int err = users.read(_isequal, _lock);
const int err = users.read(_isequal, _lock);
if (err == NOERR)
{
users.zero("CONNECTED");
users.rewrite();
}
}
bool TMenu_application::destroy()
{
deconnect_user();
TString_array list;
list_files("*.ex_", list);
list_files("*.dl_", list);
@ -1126,7 +1132,7 @@ bool TMenu_application::choose_study()
bool ok = m.run() == K_ENTER;
if (ok)
{
destroy();
deconnect_user();
prefix().set_studio(m.get(DLG_USER));
ok = create();
if (ok)

View File

@ -41,7 +41,7 @@ int PASCAL WinMain(HINSTANCE, HINSTANCE , LPSTR, int)
sprintf(msg, "Impossibile ridenominare il file %s in %s:\n%s",
oldpath, newpath, lpMsgBuf);
::LocalFree(lpMsgBuf);
::MessageBox(NULL, msg, "Errore", MB_ICONERROR | MB_OK);
::MessageBox(NULL, msg, "Ba0Close Error", MB_ICONERROR | MB_OK);
}
}

View File

@ -126,6 +126,7 @@ public:
bool installed() { return _installed;}
bool autoload();
bool install(const TString& module, int patch);
bool run_ba0close() const { return _reboot_program >= NEW_MENUPRG; }
TInstaller_mask();
virtual ~TInstaller_mask();
@ -1359,8 +1360,7 @@ void TInstaller::main_loop()
TExternal_app conversion("ba1 -0 -C");
conversion.run();
}
delete _m;
_m = NULL;
delete _m; _m = NULL;
}
class TExtendedInstaller : public TInstaller
@ -1394,8 +1394,18 @@ void TExtendedInstaller::main_loop()
TExternal_app conversion("ba1 -0 -C");
conversion.run();
}
delete _m;
_m = NULL;
const bool reboot = _m->run_ba0close();
delete _m; _m = NULL;
/*
// TBI: Aggiungere test && non sono lanciato da BA0 (oppure sono lanciato da intall.exe)
if (reboot)
{
TExternal_app ba0close("ba0close.exe");
ba0close.run(TRUE,TRUE,TRUE); // run asynchronous...
}
*/
}
int ba1700(int argc, char* argv[])

View File

@ -2,7 +2,44 @@
TOOLBAR "" 0 18 0 2
#include <toolbar.h>
BUTTON DLG_SAVEREC 10 2
BEGIN
PROMPT -15 -1 "~Registra"
MESSAGE EXIT,K_SAVE
PICTURE BMP_SAVEREC
PICTURE BMP_SAVERECDN
END
BUTTON DLG_NEWREC 10 2
BEGIN
PROMPT -25 -1 "~Nuovo"
MESSAGE EXIT,K_INS
PICTURE BMP_NEWREC
PICTURE BMP_NEWRECDN
END
BUTTON DLG_DELREC 10 2
BEGIN
PROMPT -35 -1 "~Elimina"
MESSAGE EXIT,K_DEL
PICTURE BMP_DELREC
PICTURE BMP_DELRECDN
END
BUTTON DLG_CANCEL 10 2
BEGIN
PROMPT -45 -1 "~Annulla"
MESSAGE EXIT,K_ESC
PICTURE 102
END
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -55 -1 "~Fine"
MESSAGE EXIT,K_QUIT
PICTURE BMP_QUIT
PICTURE BMP_QUITDN
END
ENDPAGE