diff api/Commands/CreateAndAddUnitCommand.cs @ 298:483b491d18f4

Fixes #337: Merge API v0.1.1 changes into v0.2 * Merge translation-related changes from v0.1.1 branch
author IBBoard <dev@ibboard.co.uk>
date Mon, 17 Jan 2011 20:02:41 +0000
parents 391446c9b250
children
line wrap: on
line diff
--- a/api/Commands/CreateAndAddUnitCommand.cs	Fri Jan 07 03:35:50 2011 +0000
+++ b/api/Commands/CreateAndAddUnitCommand.cs	Mon Jan 17 20:02:41 2011 +0000
@@ -14,9 +14,7 @@
 		private UnitType addedUnitType;
 		private ArmyCategory armyCat;
 		private Unit addedUnit;
-		private string description;
-		private string undoDescription;
-		
+
 		public CreateAndAddUnitCommand(UnitType toAdd, ArmyCategory armyCatTo)
 		{
 			addedUnitType = toAdd;
@@ -25,19 +23,14 @@
 
 		public override bool CanExecute()
 		{
-			return (addedUnitType!=null && armyCat!=null);
+			return (addedUnitType != null && armyCat != null);
 		}
 
 		public override string Description
 		{
 			get
 			{
-				if (description == null)
-				{
-					description = Translation.GetTranslation("createAndAddUnitCommandDescription", "add unit of {0} to the army", addedUnitType.Name);
-				}
-				
-				return description;
+				return Translation.GetTranslation("createAndAddUnitCommandDescription", "add unit of {0} to the army", addedUnitType.Name);
 			}
 		}
 
@@ -45,12 +38,7 @@
 		{
 			get
 			{
-				if (undoDescription == null)
-				{
-					undoDescription = Translation.GetTranslation("createAndAddUnitCommandUndoDescription", "remove unit of {0} from army", addedUnitType.Name);
-				}
-				
-				return undoDescription;
+				return Translation.GetTranslation("createAndAddUnitCommandUndoDescription", "remove unit of {0} from army", addedUnitType.Name);
 			}
 		}