From 7c73bdacd720446d75339437292bd39788221f37 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 11 Jun 2003 11:02:13 +0000 Subject: [PATCH] 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 --- ba/ba0100.cpp | 16 +++++++++++----- ba/ba0close.cpp | 2 +- ba/ba1700.cpp | 18 ++++++++++++++---- ba/batbins.uml | 39 ++++++++++++++++++++++++++++++++++++++- 4 files changed, 64 insertions(+), 11 deletions(-) diff --git a/ba/ba0100.cpp b/ba/ba0100.cpp index 1662d7def..ade15d2be 100755 --- a/ba/ba0100.cpp +++ b/ba/ba0100.cpp @@ -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) diff --git a/ba/ba0close.cpp b/ba/ba0close.cpp index 8c3faf59b..1a0ed0781 100755 --- a/ba/ba0close.cpp +++ b/ba/ba0close.cpp @@ -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); } } diff --git a/ba/ba1700.cpp b/ba/ba1700.cpp index b7424dba4..2af6952ee 100755 --- a/ba/ba1700.cpp +++ b/ba/ba1700.cpp @@ -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[]) diff --git a/ba/batbins.uml b/ba/batbins.uml index 05949399f..c57559aff 100755 --- a/ba/batbins.uml +++ b/ba/batbins.uml @@ -2,7 +2,44 @@ TOOLBAR "" 0 18 0 2 -#include +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