diff --git a/setup/Setup.cpp b/setup/Setup.cpp index 7f4cfcf9c..624a6f535 100755 --- a/setup/Setup.cpp +++ b/setup/Setup.cpp @@ -1350,15 +1350,25 @@ bool CampoSetup::SystemRunning(const wxString& strAppName, wxString strMsg) cons wxSingleInstanceChecker sicProgram(strAppName); strMsg.Replace(wxT("PRODUCT"), PRODUCT); + strMsg += "\nSi desidera ritentare?"; - int i; - for (i = 10; i > 0 && sicProgram.IsAnotherRunning(); i--) - wxSleep(1); + bool bRunning = false; + bool bRetry = true; + while (bRetry) + { + int i; + for (i = 10; i > 0 && sicProgram.IsAnotherRunning(); i--) + wxSleep(1); - if (i <= 0 && !strMsg.IsEmpty()) - ErrorBox(strMsg); + bRetry = false; + bRunning = i <= 0; + if (bRunning && !strMsg.IsEmpty()) + { + bRetry = YesNoBox(strMsg); + } + } - return i <= 0; + return bRunning; } @@ -1426,7 +1436,7 @@ bool CampoSetup::CampoRunning() const if (sicProgram.IsAnotherRunning()) { - strAppName << " è in esecuzione! E' necessario terminarlo utilizzando il Task Manager di Windows"; + strAppName << " è in esecuzione! E' necessario terminarlo utilizzando il Task Manager di Windows."; ErrorBox(strAppName); return true; }