[gbrainy] Countdown timer fixes



commit b99b8dd5ae4b82ef25a7331f0a8c5d387c73fafa
Author: Jordi Mas <jmas softcatala org>
Date:   Tue Apr 13 13:14:26 2010 +0200

    Countdown timer fixes

 src/Core/Views/CountDownView.cs |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/Core/Views/CountDownView.cs b/src/Core/Views/CountDownView.cs
index 04d94ba..d13a25a 100644
--- a/src/Core/Views/CountDownView.cs
+++ b/src/Core/Views/CountDownView.cs
@@ -31,7 +31,7 @@ namespace gbrainy.Core.Views
 {
 	public class CountDownView : IDrawable, IDrawRequest
 	{
-		static int countdown_time;
+		int countdown_time;
 		System.Timers.Timer timer;
 		EventHandler finish;
 		ISynchronizeInvoke synchronize;
@@ -98,12 +98,11 @@ namespace gbrainy.Core.Views
 		{
 			lock (this) {
 
-				if (countdown_time == 1) {
-					EndDrawCountDown ();
+				if (countdown_time <= 1) {
 					finish (this, EventArgs.Empty);
-				
-				}
-				countdown_time--;
+				} else
+					countdown_time--;
+
 				if (DrawRequest != null)
 					DrawRequest (this, EventArgs.Empty);
 			}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]