From b7da7c688576ac05ca2ca0ca9dbad44cd513c7f1 Mon Sep 17 00:00:00 2001 From: luca Date: Tue, 9 Oct 2007 13:22:42 +0000 Subject: [PATCH] Patch level :4.0 futura Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@15697 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- setup/Setup.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/setup/Setup.cpp b/setup/Setup.cpp index 69c3a6a1a..69c4aa2d6 100755 --- a/setup/Setup.cpp +++ b/setup/Setup.cpp @@ -840,14 +840,16 @@ void CampoSetup::NormalSetup() bool CampoSetup::CampoRunning(const wxString& strAppName, const wxString& strMsg) const { - bool ok = false; wxSingleInstanceChecker sicProgram(strAppName); - if (sicProgram.IsAnotherRunning()) - { + + int i; + for (i = 3; i > 0 && sicProgram.IsAnotherRunning(); i--) + wxSleep(1); + + if (i <= 0) ErrorBox(strMsg); - ok = true; - } - return ok; + + return i <= 0; }