gbrainy r343 - trunk/src



Author: jmas
Date: Sat May 17 18:11:08 2008
New Revision: 343
URL: http://svn.gnome.org/viewvc/gbrainy?rev=343&view=rev

Log:
2008-05-17 Jordi Mas <jmas softcatala org>

	* gbrainy.cs: If there was a count down message in progress, cancel it.
	* GameDrawingArea.cs: EndDrawCountDown method



Modified:
   trunk/src/ChangeLog
   trunk/src/GameDrawingArea.cs
   trunk/src/gbrainy.cs

Modified: trunk/src/GameDrawingArea.cs
==============================================================================
--- trunk/src/GameDrawingArea.cs	(original)
+++ trunk/src/GameDrawingArea.cs	Sat May 17 18:11:08 2008
@@ -144,8 +144,7 @@
 	{
 		lock (this) {
 			if (countdown_time == 1) {
-				timer.Enabled = false;
-				timer.Dispose ();
+				EndDrawCountDown ();
 				Application.Invoke ( delegate { 
 					finish (this, EventArgs.Empty);
 				});
@@ -155,6 +154,16 @@
 		}
 	}
 
+	public void EndDrawCountDown ()
+	{
+		if (timer == null)
+			return;
+
+		timer.Enabled = false;
+		timer.Dispose ();
+		timer = null;
+	}
+
 	public void OnDrawCountDown (EventHandler OnFinish)
 	{
 		mode = Modes.CountDown;

Modified: trunk/src/gbrainy.cs
==============================================================================
--- trunk/src/gbrainy.cs	(original)
+++ trunk/src/gbrainy.cs	Sat May 17 18:11:08 2008
@@ -431,6 +431,7 @@
 	
 		history.SaveGameSession (session);
 		session.EndSession ();
+		drawing_area.EndDrawCountDown ();
 		drawing_area.puzzle = null;
 
 		UpdateSolution (String.Empty);



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