changeset 125:c60fd5664698

Re #53: Create WarFoundry save class to store army as file * Fix exceptions thrown by official .Net XML parsing of namespace names Also: * Remove unnecessary notification of name change no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Mon, 24 Aug 2009 21:12:18 +0000
parents d59aa4e46761
children d5fec0698026
files api/Factories/Xml/WarFoundryXmlSaver.cs api/Objects/Unit.cs
diffstat 2 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlSaver.cs	Mon Aug 24 19:32:55 2009 +0000
+++ b/api/Factories/Xml/WarFoundryXmlSaver.cs	Mon Aug 24 21:12:18 2009 +0000
@@ -68,8 +68,8 @@
 			XmlDeclaration declaration = doc.CreateXmlDeclaration("1.0", null, null);
 			doc.AppendChild(declaration);
 			XmlSchema schema = new XmlSchema();
-			schema.Namespaces.Add("xmlns", "http://ibboard.co.uk/warfoundry/army");
-			schema.Namespaces.Add("xmlns:core", "http://ibboard.co.uk/warfoundry/core");
+			schema.Namespaces.Add("", "http://ibboard.co.uk/warfoundry/army");
+			schema.Namespaces.Add("core", "http://ibboard.co.uk/warfoundry/core");
 			doc.Schemas.Add(schema);
 			XmlElement root = doc.CreateElement("army");
 			root.SetAttribute("xmlns", "http://ibboard.co.uk/warfoundry/army");
--- a/api/Objects/Unit.cs	Mon Aug 24 19:32:55 2009 +0000
+++ b/api/Objects/Unit.cs	Mon Aug 24 21:12:18 2009 +0000
@@ -100,7 +100,6 @@
 
 		private void CalcCost()
 		{
-			String oldName = HasDefaultName() ? Name : null;
 			double oldpoints = points;
 			points = type.CostPerTrooper * AdditionalTroopers + type.BaseUnitCost;
 
@@ -113,11 +112,6 @@
 			{
 				OnPointsValueChanged(oldpoints, points);
 			}
-
-			if (oldName!=null)
-			{
-				OnNameChanged(oldName, Name);
-			}
 		}
 		
 		public int AdditionalTroopers