diff api/WarFoundryCore.cs @ 82:3ea0ab04352b

* Fix line terminators no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sat, 27 Jun 2009 18:59:49 +0000
parents 548cfc776f54
children 2f3cafb69799
line wrap: on
line diff
--- a/api/WarFoundryCore.cs	Wed May 27 19:43:09 2009 +0000
+++ b/api/WarFoundryCore.cs	Sat Jun 27 18:59:49 2009 +0000
@@ -11,20 +11,20 @@
 	public class WarFoundryCore
 	{		
 		public static readonly int INFINITY = -1;
-		public static event GameSystemChangedDelegate GameSystemChanged;
+		public static event GameSystemChangedDelegate GameSystemChanged;
 		public static event ArmyChangedDelegate ArmyChanged;
 		
 		private static GameSystem system;
 		private static Army currentArmy;
 				
-		public static GameSystem CurrentGameSystem
-		{
-			get { return system; }
-			set
-			{
-				if (system==null || !system.Equals(value))
+		public static GameSystem CurrentGameSystem
+		{
+			get { return system; }
+			set
+			{
+				if (system==null || !system.Equals(value))
 				{
-					GameSystem oldSystem = system;
+					GameSystem oldSystem = system;
 					system = value;
 					
 					if (system==null)
@@ -34,55 +34,55 @@
 					else
 					{
 						LogNotifier.DebugFormat(typeof(WarFoundryCore), "Game system set to {0} with ID {1}", system.Name, system.ID); 
-					}
-
-					if (GameSystemChanged!=null)
-					{
-						GameSystemChanged(oldSystem, system);
+					}
+
+					if (GameSystemChanged!=null)
+					{
+						GameSystemChanged(oldSystem, system);
 					}
 					
 					//If we've changed the game system then we can't keep the current army
-					CurrentArmy = null;
-				}
-			}
+					CurrentArmy = null;
+				}
+			}
 		}
 		
-		public static Army CurrentArmy
-		{
-			get { return currentArmy; }
-			set
-			{
-				if (currentArmy==null || !currentArmy.Equals(value))
-				{
-					/*if (currentArmy!=null)
-					{
-						currentArmy.UnitAdded-= UnitAddedMethod;
-						currentArmy.UnitRemoved-= UnitRemovedMethod;
-						currentArmy.PointsValueChanged-= PointsValueChangedMethod;
-						currentArmy.FailedRequirement-=FailedUnitRequirementMethod;
-					}*/
-					Army oldArmy = currentArmy;
+		public static Army CurrentArmy
+		{
+			get { return currentArmy; }
+			set
+			{
+				if (currentArmy==null || !currentArmy.Equals(value))
+				{
+					/*if (currentArmy!=null)
+					{
+						currentArmy.UnitAdded-= UnitAddedMethod;
+						currentArmy.UnitRemoved-= UnitRemovedMethod;
+						currentArmy.PointsValueChanged-= PointsValueChangedMethod;
+						currentArmy.FailedRequirement-=FailedUnitRequirementMethod;
+					}*/
+					Army oldArmy = currentArmy;
 					currentArmy = value;
 					
 					if (currentArmy!=null)
 					{
 						CurrentGameSystem = currentArmy.GameSystem; //Set the game system in case the new army is from a different system
-					}
-
-					/*if (currentArmy!=null)
-					{
-						currentArmy.UnitAdded+= UnitAddedMethod;
-						currentArmy.UnitRemoved+= UnitRemovedMethod;
-						currentArmy.PointsValueChanged+= PointsValueChangedMethod;
-						currentArmy.FailedRequirement+=FailedUnitRequirementMethod;
-					}*/
-
-					if (ArmyChanged!=null)
-					{
-						ArmyChanged(oldArmy, currentArmy);
-					}
-				}
-			}
+					}
+
+					/*if (currentArmy!=null)
+					{
+						currentArmy.UnitAdded+= UnitAddedMethod;
+						currentArmy.UnitRemoved+= UnitRemovedMethod;
+						currentArmy.PointsValueChanged+= PointsValueChangedMethod;
+						currentArmy.FailedRequirement+=FailedUnitRequirementMethod;
+					}*/
+
+					if (ArmyChanged!=null)
+					{
+						ArmyChanged(oldArmy, currentArmy);
+					}
+				}
+			}
 		}
 	}
 }