changeset 115:d0c60b3204c1

Re #53: Add XML army saving * Make file identifiers public * Add army identifier to comment no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sat, 22 Aug 2009 19:41:15 +0000
parents a143b077a825
children 2010a7e8bf9a
files api/Factories/AbstractNativeWarFoundryFactory.cs api/Factories/Xml/WarFoundryXmlSaver.cs
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/api/Factories/AbstractNativeWarFoundryFactory.cs	Sat Aug 22 18:35:03 2009 +0000
     1.2 +++ b/api/Factories/AbstractNativeWarFoundryFactory.cs	Sat Aug 22 19:41:15 2009 +0000
     1.3 @@ -23,9 +23,9 @@
     1.4  	/// </summary>
     1.5  	public abstract class AbstractNativeWarFoundryFactory : AbstractWarFoundryFactory<ZipFile>, INativeWarFoundryFactory
     1.6  	{
     1.7 -		protected static readonly string SYSTEM_ZIP_IDENTIFIER = "WarFoundry_System";
     1.8 -		protected static readonly string RACE_ZIP_IDENTIFIER = "WarFoundry_Race";
     1.9 -		protected static readonly string ARMY_ZIP_IDENTIFIER = "WarFoundry_Army";
    1.10 +		public static readonly string SYSTEM_ZIP_IDENTIFIER = "WarFoundry_System";
    1.11 +		public static readonly string RACE_ZIP_IDENTIFIER = "WarFoundry_Race";
    1.12 +		public static readonly string ARMY_ZIP_IDENTIFIER = "WarFoundry_Army";
    1.13  				
    1.14  		protected AbstractNativeWarFoundryFactory()
    1.15  		{
     2.1 --- a/api/Factories/Xml/WarFoundryXmlSaver.cs	Sat Aug 22 18:35:03 2009 +0000
     2.2 +++ b/api/Factories/Xml/WarFoundryXmlSaver.cs	Sat Aug 22 19:41:15 2009 +0000
     2.3 @@ -35,6 +35,7 @@
     2.4  				file = ZipFile.Create(savePath);
     2.5  				file.BeginUpdate();
     2.6  				file.Add(new StringZipEntrySource(CreateXmlString(toSave)), "data.armyx");
     2.7 +				file.SetComment(AbstractNativeWarFoundryFactory.ARMY_ZIP_IDENTIFIER);
     2.8  				file.CommitUpdate();
     2.9  				success = true;
    2.10  			}