changeset 142:e0af96397e26

Re #203: Translate WarFoundry * Actually add German translation * Make controls on Pref form use custom translatable IBB versions so that they translate * Make new menu item a custom translatable IBB version so that it translates
author IBBoard <dev@ibboard.co.uk>
date Wed, 14 Apr 2010 19:42:45 +0000
parents 4aabe514c868
children 28105d9c2b25
files FrmMain.cs FrmPreferences.Designer.cs translations/de.translation
diffstat 3 files changed, 1116 insertions(+), 1000 deletions(-) [+]
line wrap: on
line diff
--- a/FrmMain.cs	Tue Apr 13 20:02:49 2010 +0000
+++ b/FrmMain.cs	Wed Apr 14 19:42:45 2010 +0000
@@ -1,165 +1,165 @@
-// This file (FrmMain.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard.
-//
-// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
-
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.ComponentModel;
-using System.Windows.Forms;
-using System.Data;
-using System.IO;
-using System.Threading;
-using log4net;
-using IBBoard;
-using IBBoard.CustomMath;
-using IBBoard.Commands;
-using IBBoard.IO;
-using IBBoard.Lang;
-using IBBoard.Windows.Forms;
-using IBBoard.Windows.Forms.I18N;
-using IBBoard.Xml;
-using IBBoard.WarFoundry.API;
-using IBBoard.WarFoundry.API.Commands;
-using IBBoard.WarFoundry.API.Exporters;
-using IBBoard.WarFoundry.API.Objects;
-using IBBoard.WarFoundry.API.Savers;
-using IBBoard.WarFoundry.API.Factories;
-using IBBoard.WarFoundry.API.Factories.Xml;
-
-namespace IBBoard.WarFoundry.GUI.WinForms
-{
-	/// <summary>
-	/// Summary description for Form1.
-	/// </summary>
-	public class FrmMain : System.Windows.Forms.Form
-	{
-		private static readonly string AppTitle = "WarFoundry";
-		internal static readonly string VERSION = "0.1b8pre";
-        const string DefaultDataDir = "data";
-
-		private Preferences preferences;
-		private readonly ILog log = LogManager.GetLogger(typeof(FrmMain));
-
-		private CommandStack commandStack;
-
-		public ObjectAddDelegate UnitAddedMethod;
-		public ObjectRemoveDelegate UnitRemovedMethod;
-		public DoubleValChangedDelegate PointsValueChangedMethod;
-		//public FailedUnitRequirementDelegate FailedUnitRequirementMethod;
-
-		private FrmArmyTree armyTree;
-		private string loadedFilePath;
-		private Dictionary<string, FrmUnit> unitWindows;
-
-		private System.ComponentModel.IContainer components;
-		private System.Windows.Forms.OpenFileDialog openArmyDialog;
-		private System.Windows.Forms.SaveFileDialog saveArmyDialog;
-		private System.Windows.Forms.MainMenu mainMenu;
-		private IBBoard.Windows.Forms.ColorableStatusBarPanel sbMainPanel;
-		private IBBoard.Windows.Forms.ColorableStatusBarPanel sbErrorPanel;
-		private IBBoard.Windows.Forms.ColorableStatusBarPanel sbPointsPanel;
-		private System.Windows.Forms.ContextMenu undoMenu;
-		private System.Windows.Forms.ContextMenu redoMenu;
-		private IBBoard.Windows.Forms.ColorableStatusBar statusBar;
-		private System.Windows.Forms.Timer statusBarTimer;
-		private MenuStrip menuStrip;
-		private IBBToolStripMenuItem menuFile;
-		private IBBToolStripMenuItem miNewArmy;
-		private IBBToolStripMenuItem miOpenArmy;
-		private IBBToolStripMenuItem miSaveArmy;
-		private IBBToolStripMenuItem miSaveArmyAs;
-		private IBBToolStripMenuItem miExportArmyAs;
-		private IBBToolStripMenuItem miExportArmyAsBasicHTML;
-		private IBBToolStripMenuItem miCloseArmy;
-		private ToolStripSeparator toolStripSeparator1;
-		private IBBToolStripMenuItem miReloadFiles;
-		private ToolStripSeparator toolStripSeparator2;
-		private IBBToolStripMenuItem miExit;
-		private IBBToolStripMenuItem menuEdit;
-		private IBBToolStripMenuItem miUndo;
-		private IBBToolStripMenuItem miRedo;
-		private IBBToolStripMenuItem menuHelp;
-		private ToolStrip mainToolStrip;
-		private IBBToolStripButton bttnNewArmy;
-		private IBBToolStripButton bttnOpenArmy;
-		private IBBToolStripButton bttnSaveArmy;
-		private ToolStripSeparator toolStripSeparator3;
-		private IBBToolStripSplitButton bttnUndo;
-		private IBBToolStripSplitButton bttnRedo;
-		private ToolStrip catToolStrip;
+// This file (FrmMain.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard.
+//
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+using System.IO;
+using System.Threading;
+using log4net;
+using IBBoard;
+using IBBoard.CustomMath;
+using IBBoard.Commands;
+using IBBoard.IO;
+using IBBoard.Lang;
+using IBBoard.Windows.Forms;
+using IBBoard.Windows.Forms.I18N;
+using IBBoard.Xml;
+using IBBoard.WarFoundry.API;
+using IBBoard.WarFoundry.API.Commands;
+using IBBoard.WarFoundry.API.Exporters;
+using IBBoard.WarFoundry.API.Objects;
+using IBBoard.WarFoundry.API.Savers;
+using IBBoard.WarFoundry.API.Factories;
+using IBBoard.WarFoundry.API.Factories.Xml;
+
+namespace IBBoard.WarFoundry.GUI.WinForms
+{
+	/// <summary>
+	/// Summary description for Form1.
+	/// </summary>
+	public class FrmMain : System.Windows.Forms.Form
+	{
+		private static readonly string AppTitle = "WarFoundry";
+		internal static readonly string VERSION = "0.1b8pre";
+        const string DefaultDataDir = "data";
+
+		private Preferences preferences;
+		private readonly ILog log = LogManager.GetLogger(typeof(FrmMain));
+
+		private CommandStack commandStack;
+
+		public ObjectAddDelegate UnitAddedMethod;
+		public ObjectRemoveDelegate UnitRemovedMethod;
+		public DoubleValChangedDelegate PointsValueChangedMethod;
+		//public FailedUnitRequirementDelegate FailedUnitRequirementMethod;
+
+		private FrmArmyTree armyTree;
+		private string loadedFilePath;
+		private Dictionary<string, FrmUnit> unitWindows;
+
+		private System.ComponentModel.IContainer components;
+		private System.Windows.Forms.OpenFileDialog openArmyDialog;
+		private System.Windows.Forms.SaveFileDialog saveArmyDialog;
+		private System.Windows.Forms.MainMenu mainMenu;
+		private IBBoard.Windows.Forms.ColorableStatusBarPanel sbMainPanel;
+		private IBBoard.Windows.Forms.ColorableStatusBarPanel sbErrorPanel;
+		private IBBoard.Windows.Forms.ColorableStatusBarPanel sbPointsPanel;
+		private System.Windows.Forms.ContextMenu undoMenu;
+		private System.Windows.Forms.ContextMenu redoMenu;
+		private IBBoard.Windows.Forms.ColorableStatusBar statusBar;
+		private System.Windows.Forms.Timer statusBarTimer;
+		private MenuStrip menuStrip;
+		private IBBToolStripMenuItem menuFile;
+		private IBBToolStripMenuItem miNewArmy;
+		private IBBToolStripMenuItem miOpenArmy;
+		private IBBToolStripMenuItem miSaveArmy;
+		private IBBToolStripMenuItem miSaveArmyAs;
+		private IBBToolStripMenuItem miExportArmyAs;
+		private IBBToolStripMenuItem miExportArmyAsBasicHTML;
+		private IBBToolStripMenuItem miCloseArmy;
+		private ToolStripSeparator toolStripSeparator1;
+		private IBBToolStripMenuItem miReloadFiles;
+		private ToolStripSeparator toolStripSeparator2;
+		private IBBToolStripMenuItem miExit;
+		private IBBToolStripMenuItem menuEdit;
+		private IBBToolStripMenuItem miUndo;
+		private IBBToolStripMenuItem miRedo;
+		private IBBToolStripMenuItem menuHelp;
+		private ToolStrip mainToolStrip;
+		private IBBToolStripButton bttnNewArmy;
+		private IBBToolStripButton bttnOpenArmy;
+		private IBBToolStripButton bttnSaveArmy;
+		private ToolStripSeparator toolStripSeparator3;
+		private IBBToolStripSplitButton bttnUndo;
+		private IBBToolStripSplitButton bttnRedo;
+		private ToolStrip catToolStrip;
 		private ToolStripPanel toolStripPanel;
 		private ToolStripSeparator toolStripSeparator4;
-		private ToolStripMenuItem miPreferences;
-		private IBBToolStripMenuItem miAbout;
-
-		/// <summary>
-		/// The main entry point for the application.
-		/// </summary>
-		[STAThread]
-		static void Main(string[] args)
-		{
-			try
-			{
-				LogManager.GetLogger(typeof(FrmMain)).Info("Starting WarFoundry WinForms");
-				Application.EnableVisualStyles();
-				Application.Run(new FrmMain(args));
-				LogManager.GetLogger(typeof(FrmMain)).Info("Closing WarFoundry WinForms");
-			}
-			catch (Exception ex)
-			{
-				LogManager.GetLogger(typeof(FrmMain)).Fatal(ex);
-				MessageBox.Show(null, "A major, unexpected and fatal error ocurred while starting the application: \r\n\r\n" + ex.Message + "\r\n\r\n" + ex.StackTrace, "Fatal error", MessageBoxButtons.OK, MessageBoxIcon.Error);
-			}
-		}
-
-		public FrmMain(string[] args)
-		{
-			this.Closing+=new CancelEventHandler(FrmMain_Closing);
-			CommandStack.CommandStackUpdated += new MethodInvoker(commandStack_CommandStackUpdated);
-
-			InitializeComponent();
-			toolStripPanel.Join(mainToolStrip, 0, 0);
-			toolStripPanel.Join(catToolStrip, mainToolStrip.Right, 0);
-
-			Preferences = new Preferences("WarFoundry");
-			try
-			{
-				Translation.InitialiseTranslations(Constants.ExecutablePath, Preferences["language"].ToString());
-			}
-			catch (TranslationLoadException ex)
-			{
-				log.Error("Translation loading failed for language " + Preferences["language"].ToString(), ex);
-				MessageBox.Show(this, "Translation loading failed for language " + Preferences["language"].ToString(), "Translation failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
+		private IBBToolStripMenuItem miPreferences;
+		private IBBToolStripMenuItem miAbout;
+
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
+		[STAThread]
+		static void Main(string[] args)
+		{
+			try
+			{
+				LogManager.GetLogger(typeof(FrmMain)).Info("Starting WarFoundry WinForms");
+				Application.EnableVisualStyles();
+				Application.Run(new FrmMain(args));
+				LogManager.GetLogger(typeof(FrmMain)).Info("Closing WarFoundry WinForms");
+			}
+			catch (Exception ex)
+			{
+				LogManager.GetLogger(typeof(FrmMain)).Fatal(ex);
+				MessageBox.Show(null, "A major, unexpected and fatal error ocurred while starting the application: \r\n\r\n" + ex.Message + "\r\n\r\n" + ex.StackTrace, "Fatal error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+			}
+		}
+
+		public FrmMain(string[] args)
+		{
+			this.Closing+=new CancelEventHandler(FrmMain_Closing);
+			CommandStack.CommandStackUpdated += new MethodInvoker(commandStack_CommandStackUpdated);
+
+			InitializeComponent();
+			toolStripPanel.Join(mainToolStrip, 0, 0);
+			toolStripPanel.Join(catToolStrip, mainToolStrip.Right, 0);
+
+			Preferences = new Preferences("WarFoundry");
+			try
+			{
+				Translation.InitialiseTranslations(Constants.ExecutablePath, Preferences["language"].ToString());
+			}
+			catch (TranslationLoadException ex)
+			{
+				log.Error("Translation loading failed for language " + Preferences["language"].ToString(), ex);
+				MessageBox.Show(this, "Translation loading failed for language " + Preferences["language"].ToString(), "Translation failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
 			}
 
 			Translation.TranslationChanged += new MethodInvoker(TranslationChanged);
 
-			TranslateControls();
-			unitWindows = new Dictionary<string, FrmUnit>();
-
-			WarFoundryCore.GameSystemChanged+= new GameSystemChangedDelegate(FrmMain_GameSystemChanged);
-			WarFoundryCore.ArmyChanged += new ArmyChangedDelegate(FrmMain_ArmyChanged);
-			UnitAddedMethod = new ObjectAddDelegate(FrmMain_UnitAddedMethod);
-			UnitRemovedMethod = new ObjectRemoveDelegate(FrmMain_UnitRemovedMethod);
-			PointsValueChangedMethod = new DoubleValChangedDelegate(FrmMain_PointsValueChangedMethod);
-			//FailedUnitRequirementMethod = new FailedUnitRequirementDelegate(FrmMain_FailedUnitRequirement);
-
-			sbErrorPanel.Color = Color.Red;
-			sbPointsPanel.ToolTipText = Translation.GetTranslation("statusPanelPointsToolTip", "total points value");
-
-			armyTree = new FrmArmyTree(CommandStack);
-			armyTree.MdiParent = this;
-			armyTree.StartPosition = FormStartPosition.Manual;
-			armyTree.Location = new Point(this.DisplayRectangle.Width - armyTree.Width - 10, 10);
-            ControlTranslator.TranslateControl(armyTree);
-
-            // hack to load default files
-            WarFoundryLoader.GetDefault().AddLoadDirectory(new DirectoryInfo(Constants.ExecutablePath + Constants.DirectoryString + DefaultDataDir));
-            WarFoundryLoader.GetDefault().RegisterFactory(WarFoundryXmlFactory.GetFactory());
-			WarFoundryLoader.GetDefault().FileLoadingFinished += FileLoadingFinished;
-			WarFoundrySaver.SetFileSaver(new WarFoundryXmlSaver());
+			TranslateControls();
+			unitWindows = new Dictionary<string, FrmUnit>();
+
+			WarFoundryCore.GameSystemChanged+= new GameSystemChangedDelegate(FrmMain_GameSystemChanged);
+			WarFoundryCore.ArmyChanged += new ArmyChangedDelegate(FrmMain_ArmyChanged);
+			UnitAddedMethod = new ObjectAddDelegate(FrmMain_UnitAddedMethod);
+			UnitRemovedMethod = new ObjectRemoveDelegate(FrmMain_UnitRemovedMethod);
+			PointsValueChangedMethod = new DoubleValChangedDelegate(FrmMain_PointsValueChangedMethod);
+			//FailedUnitRequirementMethod = new FailedUnitRequirementDelegate(FrmMain_FailedUnitRequirement);
+
+			sbErrorPanel.Color = Color.Red;
+			sbPointsPanel.ToolTipText = Translation.GetTranslation("statusPanelPointsToolTip", "total points value");
+
+			armyTree = new FrmArmyTree(CommandStack);
+			armyTree.MdiParent = this;
+			armyTree.StartPosition = FormStartPosition.Manual;
+			armyTree.Location = new Point(this.DisplayRectangle.Width - armyTree.Width - 10, 10);
+            ControlTranslator.TranslateControl(armyTree);
+
+            // hack to load default files
+            WarFoundryLoader.GetDefault().AddLoadDirectory(new DirectoryInfo(Constants.ExecutablePath + Constants.DirectoryString + DefaultDataDir));
+            WarFoundryLoader.GetDefault().RegisterFactory(WarFoundryXmlFactory.GetFactory());
+			WarFoundryLoader.GetDefault().FileLoadingFinished += FileLoadingFinished;
+			WarFoundrySaver.SetFileSaver(new WarFoundryXmlSaver());
 		}
 
 		private void TranslateControls()
@@ -173,58 +173,58 @@
 		void TranslationChanged()
 		{
 			TranslateControls();
-		}
-
-		public static string DataPath
-		{
-			get { return Constants.ExecutablePath+Constants.DirectoryChar+"data"; }
-		}
-
-		public static String ArmiesPath
-		{
-			get { return Environment.GetFolderPath(Environment.SpecialFolder.Personal); }
-		}
-
-		public Preferences Preferences
-		{
-			get { return preferences; }
-			set { preferences = value; }
-		}
-
-		public CommandStack CommandStack
-		{
-			get 
-			{
-				if (commandStack == null)
-				{					
-					commandStack = new CommandStack();
-				}
-
-				return commandStack; 
-			}
-		}
-
-		/// <summary>
-		/// Clean up any resources being used.
-		/// </summary>
-		protected override void Dispose( bool disposing )
-		{
-			if( disposing )
-			{
-				if (components != null) 
-				{
-					components.Dispose();
-				}
-			}
-			base.Dispose( disposing );
-		}
-
-		#region Windows Form Designer generated code
-		/// <summary>
-		/// Required method for Designer support - do not modify
-		/// the contents of this method with the code editor.
-		/// </summary>
-		private void InitializeComponent()
+		}
+
+		public static string DataPath
+		{
+			get { return Constants.ExecutablePath+Constants.DirectoryChar+"data"; }
+		}
+
+		public static String ArmiesPath
+		{
+			get { return Environment.GetFolderPath(Environment.SpecialFolder.Personal); }
+		}
+
+		public Preferences Preferences
+		{
+			get { return preferences; }
+			set { preferences = value; }
+		}
+
+		public CommandStack CommandStack
+		{
+			get 
+			{
+				if (commandStack == null)
+				{					
+					commandStack = new CommandStack();
+				}
+
+				return commandStack; 
+			}
+		}
+
+		/// <summary>
+		/// Clean up any resources being used.
+		/// </summary>
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if (components != null) 
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+
+		#region Windows Form Designer generated code
+		/// <summary>
+		/// Required method for Designer support - do not modify
+		/// the contents of this method with the code editor.
+		/// </summary>
+		private void InitializeComponent()
 		{
 			this.components = new System.ComponentModel.Container();
 			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
@@ -266,7 +266,7 @@
 			this.sbPointsPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel();
 			this.toolStripPanel = new System.Windows.Forms.ToolStripPanel();
 			this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
-			this.miPreferences = new System.Windows.Forms.ToolStripMenuItem();
+			this.miPreferences = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
 			this.menuStrip.SuspendLayout();
 			this.mainToolStrip.SuspendLayout();
 			((System.ComponentModel.ISupportInitialize) (this.sbMainPanel)).BeginInit();
@@ -598,796 +598,796 @@
 			this.ResumeLayout(false);
 			this.PerformLayout();
 
-		}
-		#endregion
-
-		private void FileLoadingFinished(List<FileLoadFailure> failures)
-		{
-			foreach (FileLoadFailure failure in failures)
-			{
-				log.Warn("Failed to load " + failure.FailedFile.FullName + ": " + failure.Message);
-			}
-		}
-
-		private void miExit_Click(object sender, System.EventArgs e)
-		{
-			Application.Exit();
-		}
-
-		private void miNewArmy_Click(object sender, System.EventArgs e)
-		{
-			CreateNewArmy();
-		}
-
-		private void CreateNewArmy()
-		{
-			if (CloseCurrentArmy())
-			{
-				FrmNewArmy newArmy = new FrmNewArmy(CurrentGameSystem);
-				DialogResult dr = newArmy.ShowDialog();
-
-				if (dr == DialogResult.OK)
-				{
-					try
-					{
-						CurrentArmy = new Army(newArmy.SelectedRace, newArmy.ArmyName, newArmy.ArmySize);
-					}
-					catch (RequiredDataMissingException ex)
-					{
-						log.Error("Required data missing from race file", ex);
-						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidRaceFileBoxTitle", "invalid race file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
-					}
-					catch (InvalidFileException ex)
-					{
-						log.Error("Race file was invalid", ex);
-						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidRaceFileBoxTitle", "invalid race file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
-					}
-				}
-			}
-		}
-
-		private bool OpenArmy()
-		{
-			if (openArmyDialog.Filter=="")
-			{
-				string savePath = ArmiesPath;
-			
-				if (!Directory.Exists(savePath))
-				{
-					Directory.CreateDirectory(savePath);
-				}
-
-				openArmyDialog.InitialDirectory = savePath;
-				openArmyDialog.Filter = Translation.GetTranslation("armyFileFilter")+"|*.army";
-				openArmyDialog.Title = Translation.GetTranslation("openArmyDialog");
-
-			}
-
-			DialogResult dr = openArmyDialog.ShowDialog(this);
-
-			if (dr == DialogResult.OK)
-			{
-				if (CloseCurrentArmy())
-				{
-					try
-					{
-						string newFilePath = openArmyDialog.FileName;
-						CurrentArmy = WarFoundryLoader.GetDefault().LoadArmy(new FileInfo(newFilePath));
-						loadedFilePath = newFilePath;
-						return true;
-					}
-					catch (RequiredDataMissingException ex)
-					{
-						log.Error(ex);
-						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidArmyFileBoxTitle", "invalid army file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
-						return false;
-					}
-					catch (InvalidFileException ex)
-					{
-						log.Error(ex);
-						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidArmyFileBoxTitle", "invalid army file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
-						return false;
-					}
-				}
-				else
-				{
-					return false;
-				}
-			}
-			else
-			{
-				return false;
-			}
-		}
-
-		private bool CloseCurrentArmy()
-		{
-			if (CurrentArmy!=null)
-			{
-				bool canClose = false;
-
-				if (CommandStack.IsDirty())
-				{
-					string saveChanges = Translation.GetTranslation("SaveChangesQuestion", "the army \"{0}\" has been modified\r\nsave changes before closing army?", CurrentArmy.Name);
-					string saveChangesTitle = Translation.GetTranslation("SaveChangesTitle", "unsaved changes");
-					DialogResult dr = MessageBox.Show(this, saveChanges, saveChangesTitle, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button3);
-
-					if (dr == DialogResult.Yes)
-					{
-						canClose = SaveCurrentArmy();
-					}
-					else if (dr == DialogResult.No)
-					{
-						canClose = true;
-					}
-					//else they said cancel and we default to "canClose = false" so do nothing
-				}
-				else
-				{
-					canClose = true;
-				}
-
-				if (canClose)
-				{
-					//do close
-					DisableCategoryButtons();
-					CurrentArmy = null;
-					return true;
-				}
-				else
-				{
-					return false;
-				}
-			}
-			else
-			{
-				DisableCategoryButtons();
-				//pretend we succeeded
-				return true;
-			}
-		}
-
-		private void UndoLastAction()
-		{
-			if (commandStack.CanUndo())
-			{
-				commandStack.Undo();
-			}
-		}
-
-		private void RedoAction()
-		{
-			if (commandStack.CanRedo())
-			{
-				commandStack.Redo();
-			}
-		}
-
-		private bool SaveCurrentArmy()
-		{
-			bool saved = false;
-
-			string filePath = loadedFilePath;
-
-			if (filePath == null)
-			{
-				filePath = PromptForArmyFilePath();
-			}
-
-			if (filePath != null)
-			{
-				saved = SaveCurrentArmyToFile(filePath);
-			}
-
-			return saved;
-		}
-
-		private bool SaveCurrentArmyAs()
-		{
-			bool saved = false;
-			string filePath = PromptForArmyFilePath();
-
-			if (filePath != null)
-			{
-				saved = SaveCurrentArmyToFile(filePath);
-			}
-			
-			return saved;
-		}
-
-		private bool SaveCurrentArmyToFile(string filePath)
-		{
-			if (WarFoundrySaver.GetSaver().Save(CurrentArmy, filePath))
-			{
-				loadedFilePath = filePath;
-				miSaveArmy.Enabled = false;
-				bttnSaveArmy.Enabled = false;
-				CommandStack.setCleanMark();
-				return true;
-			}
-			else
-			{
-				MessageBox.Show(this, Translation.GetTranslation("SaveFailed", "file save failed - check log for details"), Translation.GetTranslation("SaveFailedTitle", "file save failed"), MessageBoxButtons.OK, MessageBoxIcon.Error);
-				return false;
-			}
-		}
-
-		private string PromptForArmyFilePath()
-		{
-			if (saveArmyDialog.Filter == "")
-			{
-				string savePath = ArmiesPath;
-				
-				if (!Directory.Exists(savePath))
-				{
-					Directory.CreateDirectory(savePath);
-				}
-
-				saveArmyDialog.InitialDirectory = savePath;
-				saveArmyDialog.Filter = Translation.GetTranslation("armyFileFilter")+"|*.army";
-				saveArmyDialog.Title = Translation.GetTranslation("saveArmyDialog");
-			}
-
-			DialogResult dr = saveArmyDialog.ShowDialog(this);
-
-			if (dr == DialogResult.OK)
-			{
-				return saveArmyDialog.FileName;
-			}
-			else
-			{
-				return null;
-			}
-		}
-
-		public GameSystem CurrentGameSystem
-		{
-			get { return WarFoundryCore.CurrentGameSystem; }
-			set { WarFoundryCore.CurrentGameSystem = value; }
-		}
-
-		public Army CurrentArmy
-		{
-			get { return WarFoundryCore.CurrentArmy; }
-			set { SetArmy(value); }
-		}
-
-		private void FrmMain_GameSystemChanged(GameSystem oldSystem, GameSystem newSystem)
-		{
-			SetAppTitle();
-			RemoveCategoryButtons();
-		}
-
-		private void FrmMain_ArmyChanged(Army oldArmy, Army newArmy)
-		{
-			CommandStack.Reset();
-			loadedFilePath = null;
-			miSaveArmy.Enabled = false;
-			bttnSaveArmy.Enabled = false;
-			SetPointsPanelText();
-			SetAppTitle();
-		}
-
-		private void SetArmy(Army newArmy)
-		{
-			IgnoreArmy(CurrentArmy);
-			CloseAllUnitWindows();
-
-			if (newArmy == null)
-			{
-				SetNullArmyState();
-			}
-			else
-			{
-				WarFoundryCore.CurrentGameSystem = newArmy.GameSystem;
-				ListenToArmy(newArmy);
-				SetNonNullArmyState(newArmy);
-			}
-			
-			WarFoundryCore.CurrentArmy = newArmy;
-		}
-
-		private void IgnoreArmy(Army oldArmy)
-		{
-			if (oldArmy != null)
-			{
-				oldArmy.UnitAdded -= UnitAddedMethod;
-				oldArmy.UnitRemoved -= UnitRemovedMethod;
-				oldArmy.PointsValueChanged -= PointsValueChangedMethod;
-			}
-		}
-
-		private void CloseAllUnitWindows()
-		{
-			FrmUnit[] unitForms = DictionaryUtils.ToArray(unitWindows);
-
-			foreach (FrmUnit window in unitForms)
-			{
-				window.Close();
-			}
-
-			unitWindows.Clear();
-		}
-
-		private void ListenToArmy(Army newArmy)
-		{
-			if (newArmy != null)
-			{
-				newArmy.UnitAdded += UnitAddedMethod;
-				newArmy.UnitRemoved += UnitRemovedMethod;
-				newArmy.PointsValueChanged += PointsValueChangedMethod;
-			}
-		}
-
-		private void SetNullArmyState()
-		{
-			miSaveArmyAs.Enabled = false;
-			miCloseArmy.Enabled = false;
-			miExportArmyAs.Enabled = false;
-			DisableCategoryButtons();
-			armyTree.Hide();
-		}
-
-		private void SetNonNullArmyState(Army newArmy)
-		{
-			SetCategoryButtons(newArmy.Race.Categories);
-			EnableCategoryButtons();
-			miSaveArmyAs.Enabled = true;
-			miCloseArmy.Enabled = true;
-			miExportArmyAs.Enabled = true;
-			armyTree.Show();
-		}
-
-		private void SetCategoryButtons(Category[] cats)
-		{
-			if (CategoryButtonsHaveChanged(cats))
-			{
-				RemoveCategoryButtons();
-				AddCategoryButtons(cats);
-			}
-		}
-
-		private bool CategoryButtonsHaveChanged(Category[] cats)
-		{
-			int catCount = cats.Length;
-			ToolStripItemCollection items = catToolStrip.Items;
-			bool haveChanged = (!catToolStrip.Visible || catCount != items.Count);
-
-			if (!haveChanged)
-			{
-				for (int i = 0; i < catCount; i++)
-				{
-					if (cats[i].Equals(items[i+1].Tag))
-					{
-						haveChanged = true;
-						break;
-					}
-				}
-			}
-
-			return haveChanged;
-		}
-
-		private void RemoveCategoryButtons()
-		{
-			this.Invoke(new MethodInvoker(catToolStrip.Items.Clear));
-		}
-
-		private void AddCategoryButtons(Category[] cats)
-		{
-			int catCount = cats.Length;
-			Category cat;
-			IBBToolStripButton[] categoryButtons = new IBBToolStripButton[catCount];
-			int buttonWidths = 0;
-
-			for (int i = 0; i < catCount; i++)
-			{
-				cat = cats[i];
-				IBBToolStripButton button = new IBBToolStripButton();
-				button.Text = cat.Name;
-				button.Tag = cat;
-				button.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.list_add;
-				button.Enabled = false;
-				button.Click += new EventHandler(CreateUnitForCategoryButtonClick);
-				categoryButtons[i] = button;
-				buttonWidths += button.Width;
-			}
-
-			log.Debug("Toolstrip width: " + catToolStrip.Width);
-			log.Debug("Button widths: " + buttonWidths);
-
-			this.Invoke(new ArrayMethodInvoker<IBBToolStripButton>(catToolStrip.Items.AddRange), new object[]{ categoryButtons });
-		}
-
-		private void CreateUnitForCategoryButtonClick(object sender, EventArgs e)
-		{
-			if (sender is IBBToolStripButton)
-			{
-				IBBToolStripButton button = (IBBToolStripButton)sender;
-				object tag = button.Tag;
-
-				if (tag is Category)
-				{
-					AddUnitFromCategory((Category)tag);
-				}
-			}
-		}
-
-		private void EnableCategoryButtons()
-		{
-			catToolStrip.Visible = true;
-			SetCategoryButtonState(true);
-		}
-
-		private void DisableCategoryButtons()
-		{
-			catToolStrip.Visible = false;
-			SetCategoryButtonState(false);
-		}
-
-		private void SetCategoryButtonState(bool state)
-		{
-			foreach (IBBToolStripButton button in catToolStrip.Items)
-			{
-				button.Enabled = state;
-			}
-		}
-
-		private void miSaveArmyAs_Click(object sender, System.EventArgs e)
-		{
-			SaveCurrentArmyAs();
-		}
-
-		private void commandStack_CommandStackUpdated()
-		{
-			bttnUndo.Enabled = commandStack.CanUndo();
-			miUndo.Enabled = bttnUndo.Enabled;
-			bttnRedo.Enabled = commandStack.CanRedo();
-			miRedo.Enabled = bttnRedo.Enabled;
-
-			PopulateRedoMenu();
-			PopulateUndoMenu();
-
-			bttnSaveArmy.Enabled = commandStack.IsDirty() && CurrentArmy!=null;
-			miSaveArmy.Enabled = commandStack.IsDirty() && CurrentArmy!=null;
-		}
-
-		private void PopulateRedoMenu()
-		{
-			int redoLength = commandStack.RedoLength;
-			int maxRedo = Math.Min(10, redoLength);
-			ToolStripItemCollection dropDownItems = bttnRedo.DropDownItems;
-			dropDownItems.Clear();
-
-			for (int i = 1; i <= maxRedo; i++)
-			{
-				Command cmd = commandStack.PeekRedoCommand(i);
-
-				if (cmd == null)
-				{
-					break;
-				}
-
-				dropDownItems.Add(cmd.Description, null, redoMenu_Click);
-			}
-
-			if (redoLength > 0)
-			{
-				bttnRedo.Text = commandStack.PeekRedoCommand(1).Description;
-			}
-			else
-			{
-				bttnRedo.Text = Translation.GetTranslation("bttnRedo");
-			}
-		}
-
-		private void PopulateUndoMenu()
-		{
-			int undoLength = commandStack.UndoLength;
-			int maxUndo = Math.Min(10, undoLength);
-			ToolStripItemCollection dropDownItems = bttnUndo.DropDownItems;
-			dropDownItems.Clear();
-
-			for (int i = 1; i <= maxUndo; i++)
-			{
-				Command cmd = commandStack.PeekUndoCommand(i);
-
-				if (cmd == null)
-				{
-					break;
-				}
-
-				dropDownItems.Add(cmd.UndoDescription, null, undoMenu_Click);
-			}
-
-			if (undoLength > 0)
-			{
-				bttnUndo.Text = commandStack.PeekUndoCommand(1).UndoDescription;
-			}
-			else
-			{
-				bttnUndo.Text = Translation.GetTranslation("bttnUndo");
-			}
-		}
-
-		private void miSaveArmy_Click(object sender, System.EventArgs e)
-		{
-			SaveCurrentArmy();
-		}
-
-		private void SetAppTitle()
-		{
-			string str = AppTitle;
-
-			if (CurrentGameSystem!=null)
-			{
-				str+= " - "+CurrentGameSystem.Name;
-			}
-
-			if (CurrentArmy!=null)
-			{
-				str+= " - "+CurrentArmy.Name;
-			}
-
-			this.Text = str;
-		}
-
-		private void AddUnitFromCategory(Category cat)
-		{
-			FrmNewUnit newUnit = new FrmNewUnit(CurrentArmy.Race, cat, CurrentArmy);
-			DialogResult dr = newUnit.ShowDialog(this);
-
-			if (dr == DialogResult.OK)
-			{
-				CreateAndAddUnitCommand cmd = new CreateAndAddUnitCommand(newUnit.SelectedUnit, CurrentArmy.GetCategory(cat));
-				commandStack.Execute(cmd);
-				OpenUnitDialog(cmd.Unit);
-			}
-		}
-
-		internal void OpenUnitDialog(Unit unit)
-		{
-			string unitID = unit.ID;
-
-			if (unitWindows.ContainsKey(unitID))
-			{
-				unitWindows[unitID].Focus();
-			}
-			else
-			{
-				FrmUnit unitForm = new FrmUnit(unit, commandStack);
-				unitWindows.Add(unitID, unitForm);
-				unitForm.MdiParent = this;
-				unitForm.Closing += new CancelEventHandler(unitForm_Closing);
-				unitForm.Show();
-			}
-		}
-
-		private void unitForm_Closing(object sender, CancelEventArgs e)
-		{
-			if (sender is FrmUnit)
-			{
-				FrmUnit unitForm = (FrmUnit) sender;
-				unitWindows.Remove(unitForm.Unit.ID);
-			}
-		}
-
-		private void FrmMain_UnitAddedMethod(object unitObj)
-		{
-			if (unitObj is Unit)
-			{
-				Unit unit = (Unit)unitObj;
-				sbErrorPanel.Text = "";
-			}
-		}
-
-		private void FrmMain_UnitRemovedMethod(object unitObj)
-		{
-			if (unitObj is Unit)
-			{
-				Unit unit = (Unit)unitObj;
-				sbErrorPanel.Text = "";
-
-				//check if window is open, and close it if it is
-				foreach (Form frm in this.MdiChildren)
-				{
-					if (frm is FrmUnit)
-					{
-						if (((FrmUnit)frm).Unit == unit)
-						{
-							frm.Close();
-							break;
-						}
-					}
-				}
-			}
-		}
-
-		/*private void FrmMain_FailedUnitRequirement(FailedUnitRequirement failedRequirement)
-		{
-			sbErrorPanel.Text = Translation.GetTranslation("UnitRequirementFailed", "Unit Requirement Failed");
-			sbErrorPanel.Tag = failedRequirement.Description;
-		}*/
-
-		/*public void MdiChildMoved()
-		{
-			Point mouseAt = PointToClient(ActiveMdiChild.Location);
-
-			if (Comparisons.ValueWithinAmount(pnlRight.Right, ActiveMdiChild.Right, 10))
-			{
-				pnlRight.Visible = true;
-				//pnlRight.Container.Add(ActiveMdiChild);
-			}
-			else
-			{
-				pnlRight.Visible = false;
-			}
-		}*/
-
-		private void miUndo_Click(object sender, System.EventArgs e)
-		{
-			UndoLastAction();
-		}
-
-		private void miRedo_Click(object sender, System.EventArgs e)
-		{
-			RedoAction();
-		}
-
-		private void miCloseArmy_Click(object sender, EventArgs e)
-		{
-			CloseCurrentArmy();
-		}
-
-		private void miOpenArmy_Click(object sender, EventArgs e)
-		{
-			OpenArmy();
-		}
-
-		private void FrmMain_PointsValueChangedMethod(WarFoundryObject obj, double oldVal, double newVal)
-		{
-			if (obj is Army)
-			{
-				SetPointsPanelText();
-			}
-		}
-
-		private void SetPointsPanelText()
-		{	
-			if (CurrentArmy==null)
-			{
-				sbPointsPanel.Text = "";
-				sbPointsPanel.ResetColor();
-			}
-			else 
-			{
-				sbPointsPanel.Text = String.Format(Translation.GetTranslation("statusPanelPoints"), CurrentArmy.Points, CurrentArmy.MaxPoints);
-
-				if (CurrentArmy.Points>CurrentArmy.MaxPoints)
-				{
-					sbPointsPanel.Color = Color.Red;
-				}
-				else
-				{
-					sbPointsPanel.ResetColor();
-				}
-			}
-		}
-
-		private void redoMenu_Click(object sender, EventArgs e)
-		{
-			if (sender is ToolStripDropDownItem)
-			{
-				ToolStripDropDownItem item = (ToolStripDropDownItem)sender;
-					//we know it's an redo menu item so find it's index and redo everything					
-				int max = bttnRedo.DropDownItems.IndexOf(item);
-
-				if (max >= 0)
-				{
-					for (int i = 0; i <= max; i++)
-					{
-						commandStack.Redo();
-					}
-				}
-			}
-		}
-
-		private void undoMenu_Click(object sender, EventArgs e)
-		{
-			if (sender is ToolStripDropDownItem)
-			{
-				ToolStripDropDownItem item = (ToolStripDropDownItem)sender;
-				//we know it's an redo menu item so find it's index and redo everything					
-				int max = bttnUndo.DropDownItems.IndexOf(item);
-
-				if (max >= 0)
-				{
-					for (int i = 0; i <= max; i++)
-					{
-						commandStack.Undo();
-					}
-				}
-			}
-		}
-
-		private void statusBar_DrawItem(object sender, System.Windows.Forms.StatusBarDrawItemEventArgs sbdevent)
-		{
-			statusBar.ColorableStatusBarDrawItem(sender, sbdevent);
-		}
-
-		private void FrmMain_Closing(object sender, CancelEventArgs e)
-		{
-			if (!CloseCurrentArmy())
-			{
-				e.Cancel = true;
-			}
-		}
-
-		private void miReloadFiles_Click(object sender, System.EventArgs e)
-		{
-			WarFoundryLoader.GetDefault().LoadFiles();
-			sbMainPanel.Text = Translation.GetTranslation("GameSystemFilesReloaded", "Game system and race files reloaded");
-			statusBarTimer.Enabled = true;
-		}
-
-		private void statusBarTimer_Tick(object sender, System.EventArgs e)
-		{
-			sbMainPanel.Text = "";
-			statusBarTimer.Enabled = false;
-		}
-
-		private void statusBar_PanelClick(object sender, StatusBarPanelClickEventArgs e)
-		{
-			if (e.StatusBarPanel == sbErrorPanel && sbErrorPanel.Text!="")
-			{
-				MessageBox.Show(this, sbErrorPanel.TagString, Translation.GetTranslation("FailedRequirementMessage"), MessageBoxButtons.OK, MessageBoxIcon.Warning);
-			}
-		}
-
-		private void miExportArmyAsBasicHTML_Click(object sender, EventArgs e)
-		{
-			SaveFileDialog dialog = new SaveFileDialog();
-			dialog.Filter = Translation.GetTranslation("armyExportBasicHtmlFilter", "HTML pages") + "|*.html";
-			dialog.Title = Translation.GetTranslation("exportArmyDialog", "Export army");
-
-			DialogResult dr = dialog.ShowDialog(this);
-
-			if (dr == DialogResult.OK)
-			{
-				Army army = CurrentArmy;
-				string filePath = dialog.FileName;
-				log.DebugFormat("Exporting {0} to {1} as basic HTML", army.Name, filePath);
-				WarFoundryHtmlExporter.GetDefault().ExportArmy(army, filePath);
-			}
-		}
-
-		private void FrmMain_Load(object sender, EventArgs e)
-		{
-			string gameSystemID = Preferences.GetStringProperty("currSystem");
-
-			if (gameSystemID != null && !"".Equals(gameSystemID))
-			{
-				log.Debug("Attempting to load current game system from properties");
-				GameSystem sys = WarFoundryLoader.GetDefault().GetGameSystem(gameSystemID);
-
-				if (sys != null)
-				{
-					WarFoundryCore.CurrentGameSystem = sys;
-					log.InfoFormat("Loaded game system {0} from properties", gameSystemID);
-				}
-			}
-		}
-
-		private void miAbout_Click(object sender, EventArgs e)
-		{
-			FrmAbout about = new FrmAbout();
-			about.ShowDialog(this);
+		}
+		#endregion
+
+		private void FileLoadingFinished(List<FileLoadFailure> failures)
+		{
+			foreach (FileLoadFailure failure in failures)
+			{
+				log.Warn("Failed to load " + failure.FailedFile.FullName + ": " + failure.Message);
+			}
+		}
+
+		private void miExit_Click(object sender, System.EventArgs e)
+		{
+			Application.Exit();
+		}
+
+		private void miNewArmy_Click(object sender, System.EventArgs e)
+		{
+			CreateNewArmy();
+		}
+
+		private void CreateNewArmy()
+		{
+			if (CloseCurrentArmy())
+			{
+				FrmNewArmy newArmy = new FrmNewArmy(CurrentGameSystem);
+				DialogResult dr = newArmy.ShowDialog();
+
+				if (dr == DialogResult.OK)
+				{
+					try
+					{
+						CurrentArmy = new Army(newArmy.SelectedRace, newArmy.ArmyName, newArmy.ArmySize);
+					}
+					catch (RequiredDataMissingException ex)
+					{
+						log.Error("Required data missing from race file", ex);
+						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidRaceFileBoxTitle", "invalid race file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
+					}
+					catch (InvalidFileException ex)
+					{
+						log.Error("Race file was invalid", ex);
+						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidRaceFileBoxTitle", "invalid race file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
+					}
+				}
+			}
+		}
+
+		private bool OpenArmy()
+		{
+			if (openArmyDialog.Filter=="")
+			{
+				string savePath = ArmiesPath;
+			
+				if (!Directory.Exists(savePath))
+				{
+					Directory.CreateDirectory(savePath);
+				}
+
+				openArmyDialog.InitialDirectory = savePath;
+				openArmyDialog.Filter = Translation.GetTranslation("armyFileFilter")+"|*.army";
+				openArmyDialog.Title = Translation.GetTranslation("openArmyDialog");
+
+			}
+
+			DialogResult dr = openArmyDialog.ShowDialog(this);
+
+			if (dr == DialogResult.OK)
+			{
+				if (CloseCurrentArmy())
+				{
+					try
+					{
+						string newFilePath = openArmyDialog.FileName;
+						CurrentArmy = WarFoundryLoader.GetDefault().LoadArmy(new FileInfo(newFilePath));
+						loadedFilePath = newFilePath;
+						return true;
+					}
+					catch (RequiredDataMissingException ex)
+					{
+						log.Error(ex);
+						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidArmyFileBoxTitle", "invalid army file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
+						return false;
+					}
+					catch (InvalidFileException ex)
+					{
+						log.Error(ex);
+						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidArmyFileBoxTitle", "invalid army file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
+						return false;
+					}
+				}
+				else
+				{
+					return false;
+				}
+			}
+			else
+			{
+				return false;
+			}
+		}
+
+		private bool CloseCurrentArmy()
+		{
+			if (CurrentArmy!=null)
+			{
+				bool canClose = false;
+
+				if (CommandStack.IsDirty())
+				{
+					string saveChanges = Translation.GetTranslation("SaveChangesQuestion", "the army \"{0}\" has been modified\r\nsave changes before closing army?", CurrentArmy.Name);
+					string saveChangesTitle = Translation.GetTranslation("SaveChangesTitle", "unsaved changes");
+					DialogResult dr = MessageBox.Show(this, saveChanges, saveChangesTitle, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button3);
+
+					if (dr == DialogResult.Yes)
+					{
+						canClose = SaveCurrentArmy();
+					}
+					else if (dr == DialogResult.No)
+					{
+						canClose = true;
+					}
+					//else they said cancel and we default to "canClose = false" so do nothing
+				}
+				else
+				{
+					canClose = true;
+				}
+
+				if (canClose)
+				{
+					//do close
+					DisableCategoryButtons();
+					CurrentArmy = null;
+					return true;
+				}
+				else
+				{
+					return false;
+				}
+			}
+			else
+			{
+				DisableCategoryButtons();
+				//pretend we succeeded
+				return true;
+			}
+		}
+
+		private void UndoLastAction()
+		{
+			if (commandStack.CanUndo())
+			{
+				commandStack.Undo();
+			}
+		}
+
+		private void RedoAction()
+		{
+			if (commandStack.CanRedo())
+			{
+				commandStack.Redo();
+			}
+		}
+
+		private bool SaveCurrentArmy()
+		{
+			bool saved = false;
+
+			string filePath = loadedFilePath;
+
+			if (filePath == null)
+			{
+				filePath = PromptForArmyFilePath();
+			}
+
+			if (filePath != null)
+			{
+				saved = SaveCurrentArmyToFile(filePath);
+			}
+
+			return saved;
+		}
+
+		private bool SaveCurrentArmyAs()
+		{
+			bool saved = false;
+			string filePath = PromptForArmyFilePath();
+
+			if (filePath != null)
+			{
+				saved = SaveCurrentArmyToFile(filePath);
+			}
+			
+			return saved;
+		}
+
+		private bool SaveCurrentArmyToFile(string filePath)
+		{
+			if (WarFoundrySaver.GetSaver().Save(CurrentArmy, filePath))
+			{
+				loadedFilePath = filePath;
+				miSaveArmy.Enabled = false;
+				bttnSaveArmy.Enabled = false;
+				CommandStack.setCleanMark();
+				return true;
+			}
+			else
+			{
+				MessageBox.Show(this, Translation.GetTranslation("SaveFailed", "file save failed - check log for details"), Translation.GetTranslation("SaveFailedTitle", "file save failed"), MessageBoxButtons.OK, MessageBoxIcon.Error);
+				return false;
+			}
+		}
+
+		private string PromptForArmyFilePath()
+		{
+			if (saveArmyDialog.Filter == "")
+			{
+				string savePath = ArmiesPath;
+				
+				if (!Directory.Exists(savePath))
+				{
+					Directory.CreateDirectory(savePath);
+				}
+
+				saveArmyDialog.InitialDirectory = savePath;
+				saveArmyDialog.Filter = Translation.GetTranslation("armyFileFilter")+"|*.army";
+				saveArmyDialog.Title = Translation.GetTranslation("saveArmyDialog");
+			}
+
+			DialogResult dr = saveArmyDialog.ShowDialog(this);
+
+			if (dr == DialogResult.OK)
+			{
+				return saveArmyDialog.FileName;
+			}
+			else
+			{
+				return null;
+			}
+		}
+
+		public GameSystem CurrentGameSystem
+		{
+			get { return WarFoundryCore.CurrentGameSystem; }
+			set { WarFoundryCore.CurrentGameSystem = value; }
+		}
+
+		public Army CurrentArmy
+		{
+			get { return WarFoundryCore.CurrentArmy; }
+			set { SetArmy(value); }
+		}
+
+		private void FrmMain_GameSystemChanged(GameSystem oldSystem, GameSystem newSystem)
+		{
+			SetAppTitle();
+			RemoveCategoryButtons();
+		}
+
+		private void FrmMain_ArmyChanged(Army oldArmy, Army newArmy)
+		{
+			CommandStack.Reset();
+			loadedFilePath = null;
+			miSaveArmy.Enabled = false;
+			bttnSaveArmy.Enabled = false;
+			SetPointsPanelText();
+			SetAppTitle();
+		}
+
+		private void SetArmy(Army newArmy)
+		{
+			IgnoreArmy(CurrentArmy);
+			CloseAllUnitWindows();
+
+			if (newArmy == null)
+			{
+				SetNullArmyState();
+			}
+			else
+			{
+				WarFoundryCore.CurrentGameSystem = newArmy.GameSystem;
+				ListenToArmy(newArmy);
+				SetNonNullArmyState(newArmy);
+			}
+			
+			WarFoundryCore.CurrentArmy = newArmy;
+		}
+
+		private void IgnoreArmy(Army oldArmy)
+		{
+			if (oldArmy != null)
+			{
+				oldArmy.UnitAdded -= UnitAddedMethod;
+				oldArmy.UnitRemoved -= UnitRemovedMethod;
+				oldArmy.PointsValueChanged -= PointsValueChangedMethod;
+			}
+		}
+
+		private void CloseAllUnitWindows()
+		{
+			FrmUnit[] unitForms = DictionaryUtils.ToArray(unitWindows);
+
+			foreach (FrmUnit window in unitForms)
+			{
+				window.Close();
+			}
+
+			unitWindows.Clear();
+		}
+
+		private void ListenToArmy(Army newArmy)
+		{
+			if (newArmy != null)
+			{
+				newArmy.UnitAdded += UnitAddedMethod;
+				newArmy.UnitRemoved += UnitRemovedMethod;
+				newArmy.PointsValueChanged += PointsValueChangedMethod;
+			}
+		}
+
+		private void SetNullArmyState()
+		{
+			miSaveArmyAs.Enabled = false;
+			miCloseArmy.Enabled = false;
+			miExportArmyAs.Enabled = false;
+			DisableCategoryButtons();
+			armyTree.Hide();
+		}
+
+		private void SetNonNullArmyState(Army newArmy)
+		{
+			SetCategoryButtons(newArmy.Race.Categories);
+			EnableCategoryButtons();
+			miSaveArmyAs.Enabled = true;
+			miCloseArmy.Enabled = true;
+			miExportArmyAs.Enabled = true;
+			armyTree.Show();
+		}
+
+		private void SetCategoryButtons(Category[] cats)
+		{
+			if (CategoryButtonsHaveChanged(cats))
+			{
+				RemoveCategoryButtons();
+				AddCategoryButtons(cats);
+			}
+		}
+
+		private bool CategoryButtonsHaveChanged(Category[] cats)
+		{
+			int catCount = cats.Length;
+			ToolStripItemCollection items = catToolStrip.Items;
+			bool haveChanged = (!catToolStrip.Visible || catCount != items.Count);
+
+			if (!haveChanged)
+			{
+				for (int i = 0; i < catCount; i++)
+				{
+					if (cats[i].Equals(items[i+1].Tag))
+					{
+						haveChanged = true;
+						break;
+					}
+				}
+			}
+
+			return haveChanged;
+		}
+
+		private void RemoveCategoryButtons()
+		{
+			this.Invoke(new MethodInvoker(catToolStrip.Items.Clear));
+		}
+
+		private void AddCategoryButtons(Category[] cats)
+		{
+			int catCount = cats.Length;
+			Category cat;
+			IBBToolStripButton[] categoryButtons = new IBBToolStripButton[catCount];
+			int buttonWidths = 0;
+
+			for (int i = 0; i < catCount; i++)
+			{
+				cat = cats[i];
+				IBBToolStripButton button = new IBBToolStripButton();
+				button.Text = cat.Name;
+				button.Tag = cat;
+				button.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.list_add;
+				button.Enabled = false;
+				button.Click += new EventHandler(CreateUnitForCategoryButtonClick);
+				categoryButtons[i] = button;
+				buttonWidths += button.Width;
+			}
+
+			log.Debug("Toolstrip width: " + catToolStrip.Width);
+			log.Debug("Button widths: " + buttonWidths);
+
+			this.Invoke(new ArrayMethodInvoker<IBBToolStripButton>(catToolStrip.Items.AddRange), new object[]{ categoryButtons });
+		}
+
+		private void CreateUnitForCategoryButtonClick(object sender, EventArgs e)
+		{
+			if (sender is IBBToolStripButton)
+			{
+				IBBToolStripButton button = (IBBToolStripButton)sender;
+				object tag = button.Tag;
+
+				if (tag is Category)
+				{
+					AddUnitFromCategory((Category)tag);
+				}
+			}
+		}
+
+		private void EnableCategoryButtons()
+		{
+			catToolStrip.Visible = true;
+			SetCategoryButtonState(true);
+		}
+
+		private void DisableCategoryButtons()
+		{
+			catToolStrip.Visible = false;
+			SetCategoryButtonState(false);
+		}
+
+		private void SetCategoryButtonState(bool state)
+		{
+			foreach (IBBToolStripButton button in catToolStrip.Items)
+			{
+				button.Enabled = state;
+			}
+		}
+
+		private void miSaveArmyAs_Click(object sender, System.EventArgs e)
+		{
+			SaveCurrentArmyAs();
+		}
+
+		private void commandStack_CommandStackUpdated()
+		{
+			bttnUndo.Enabled = commandStack.CanUndo();
+			miUndo.Enabled = bttnUndo.Enabled;
+			bttnRedo.Enabled = commandStack.CanRedo();
+			miRedo.Enabled = bttnRedo.Enabled;
+
+			PopulateRedoMenu();
+			PopulateUndoMenu();
+
+			bttnSaveArmy.Enabled = commandStack.IsDirty() && CurrentArmy!=null;
+			miSaveArmy.Enabled = commandStack.IsDirty() && CurrentArmy!=null;
+		}
+
+		private void PopulateRedoMenu()
+		{
+			int redoLength = commandStack.RedoLength;
+			int maxRedo = Math.Min(10, redoLength);
+			ToolStripItemCollection dropDownItems = bttnRedo.DropDownItems;
+			dropDownItems.Clear();
+
+			for (int i = 1; i <= maxRedo; i++)
+			{
+				Command cmd = commandStack.PeekRedoCommand(i);
+
+				if (cmd == null)
+				{
+					break;
+				}
+
+				dropDownItems.Add(cmd.Description, null, redoMenu_Click);
+			}
+
+			if (redoLength > 0)
+			{
+				bttnRedo.Text = commandStack.PeekRedoCommand(1).Description;
+			}
+			else
+			{
+				bttnRedo.Text = Translation.GetTranslation("bttnRedo");
+			}
+		}
+
+		private void PopulateUndoMenu()
+		{
+			int undoLength = commandStack.UndoLength;
+			int maxUndo = Math.Min(10, undoLength);
+			ToolStripItemCollection dropDownItems = bttnUndo.DropDownItems;
+			dropDownItems.Clear();
+
+			for (int i = 1; i <= maxUndo; i++)
+			{
+				Command cmd = commandStack.PeekUndoCommand(i);
+
+				if (cmd == null)
+				{
+					break;
+				}
+
+				dropDownItems.Add(cmd.UndoDescription, null, undoMenu_Click);
+			}
+
+			if (undoLength > 0)
+			{
+				bttnUndo.Text = commandStack.PeekUndoCommand(1).UndoDescription;
+			}
+			else
+			{
+				bttnUndo.Text = Translation.GetTranslation("bttnUndo");
+			}
+		}
+
+		private void miSaveArmy_Click(object sender, System.EventArgs e)
+		{
+			SaveCurrentArmy();
+		}
+
+		private void SetAppTitle()
+		{
+			string str = AppTitle;
+
+			if (CurrentGameSystem!=null)
+			{
+				str+= " - "+CurrentGameSystem.Name;
+			}
+
+			if (CurrentArmy!=null)
+			{
+				str+= " - "+CurrentArmy.Name;
+			}
+
+			this.Text = str;
+		}
+
+		private void AddUnitFromCategory(Category cat)
+		{
+			FrmNewUnit newUnit = new FrmNewUnit(CurrentArmy.Race, cat, CurrentArmy);
+			DialogResult dr = newUnit.ShowDialog(this);
+
+			if (dr == DialogResult.OK)
+			{
+				CreateAndAddUnitCommand cmd = new CreateAndAddUnitCommand(newUnit.SelectedUnit, CurrentArmy.GetCategory(cat));
+				commandStack.Execute(cmd);
+				OpenUnitDialog(cmd.Unit);
+			}
+		}
+
+		internal void OpenUnitDialog(Unit unit)
+		{
+			string unitID = unit.ID;
+
+			if (unitWindows.ContainsKey(unitID))
+			{
+				unitWindows[unitID].Focus();
+			}
+			else
+			{
+				FrmUnit unitForm = new FrmUnit(unit, commandStack);
+				unitWindows.Add(unitID, unitForm);
+				unitForm.MdiParent = this;
+				unitForm.Closing += new CancelEventHandler(unitForm_Closing);
+				unitForm.Show();
+			}
+		}
+
+		private void unitForm_Closing(object sender, CancelEventArgs e)
+		{
+			if (sender is FrmUnit)
+			{
+				FrmUnit unitForm = (FrmUnit) sender;
+				unitWindows.Remove(unitForm.Unit.ID);
+			}
+		}
+
+		private void FrmMain_UnitAddedMethod(object unitObj)
+		{
+			if (unitObj is Unit)
+			{
+				Unit unit = (Unit)unitObj;
+				sbErrorPanel.Text = "";
+			}
+		}
+
+		private void FrmMain_UnitRemovedMethod(object unitObj)
+		{
+			if (unitObj is Unit)
+			{
+				Unit unit = (Unit)unitObj;
+				sbErrorPanel.Text = "";
+
+				//check if window is open, and close it if it is
+				foreach (Form frm in this.MdiChildren)
+				{
+					if (frm is FrmUnit)
+					{
+						if (((FrmUnit)frm).Unit == unit)
+						{
+							frm.Close();
+							break;
+						}
+					}
+				}
+			}
+		}
+
+		/*private void FrmMain_FailedUnitRequirement(FailedUnitRequirement failedRequirement)
+		{
+			sbErrorPanel.Text = Translation.GetTranslation("UnitRequirementFailed", "Unit Requirement Failed");
+			sbErrorPanel.Tag = failedRequirement.Description;
+		}*/
+
+		/*public void MdiChildMoved()
+		{
+			Point mouseAt = PointToClient(ActiveMdiChild.Location);
+
+			if (Comparisons.ValueWithinAmount(pnlRight.Right, ActiveMdiChild.Right, 10))
+			{
+				pnlRight.Visible = true;
+				//pnlRight.Container.Add(ActiveMdiChild);
+			}
+			else
+			{
+				pnlRight.Visible = false;
+			}
+		}*/
+
+		private void miUndo_Click(object sender, System.EventArgs e)
+		{
+			UndoLastAction();
+		}
+
+		private void miRedo_Click(object sender, System.EventArgs e)
+		{
+			RedoAction();
+		}
+
+		private void miCloseArmy_Click(object sender, EventArgs e)
+		{
+			CloseCurrentArmy();
+		}
+
+		private void miOpenArmy_Click(object sender, EventArgs e)
+		{
+			OpenArmy();
+		}
+
+		private void FrmMain_PointsValueChangedMethod(WarFoundryObject obj, double oldVal, double newVal)
+		{
+			if (obj is Army)
+			{
+				SetPointsPanelText();
+			}
+		}
+
+		private void SetPointsPanelText()
+		{	
+			if (CurrentArmy==null)
+			{
+				sbPointsPanel.Text = "";
+				sbPointsPanel.ResetColor();
+			}
+			else 
+			{
+				sbPointsPanel.Text = String.Format(Translation.GetTranslation("statusPanelPoints"), CurrentArmy.Points, CurrentArmy.MaxPoints);
+
+				if (CurrentArmy.Points>CurrentArmy.MaxPoints)
+				{
+					sbPointsPanel.Color = Color.Red;
+				}
+				else
+				{
+					sbPointsPanel.ResetColor();
+				}
+			}
+		}
+
+		private void redoMenu_Click(object sender, EventArgs e)
+		{
+			if (sender is ToolStripDropDownItem)
+			{
+				ToolStripDropDownItem item = (ToolStripDropDownItem)sender;
+					//we know it's an redo menu item so find it's index and redo everything					
+				int max = bttnRedo.DropDownItems.IndexOf(item);
+
+				if (max >= 0)
+				{
+					for (int i = 0; i <= max; i++)
+					{
+						commandStack.Redo();
+					}
+				}
+			}
+		}
+
+		private void undoMenu_Click(object sender, EventArgs e)
+		{
+			if (sender is ToolStripDropDownItem)
+			{
+				ToolStripDropDownItem item = (ToolStripDropDownItem)sender;
+				//we know it's an redo menu item so find it's index and redo everything					
+				int max = bttnUndo.DropDownItems.IndexOf(item);
+
+				if (max >= 0)
+				{
+					for (int i = 0; i <= max; i++)
+					{
+						commandStack.Undo();
+					}
+				}
+			}
+		}
+
+		private void statusBar_DrawItem(object sender, System.Windows.Forms.StatusBarDrawItemEventArgs sbdevent)
+		{
+			statusBar.ColorableStatusBarDrawItem(sender, sbdevent);
+		}
+
+		private void FrmMain_Closing(object sender, CancelEventArgs e)
+		{
+			if (!CloseCurrentArmy())
+			{
+				e.Cancel = true;
+			}
+		}
+
+		private void miReloadFiles_Click(object sender, System.EventArgs e)
+		{
+			WarFoundryLoader.GetDefault().LoadFiles();
+			sbMainPanel.Text = Translation.GetTranslation("GameSystemFilesReloaded", "Game system and race files reloaded");
+			statusBarTimer.Enabled = true;
+		}
+
+		private void statusBarTimer_Tick(object sender, System.EventArgs e)
+		{
+			sbMainPanel.Text = "";
+			statusBarTimer.Enabled = false;
+		}
+
+		private void statusBar_PanelClick(object sender, StatusBarPanelClickEventArgs e)
+		{
+			if (e.StatusBarPanel == sbErrorPanel && sbErrorPanel.Text!="")
+			{
+				MessageBox.Show(this, sbErrorPanel.TagString, Translation.GetTranslation("FailedRequirementMessage"), MessageBoxButtons.OK, MessageBoxIcon.Warning);
+			}
+		}
+
+		private void miExportArmyAsBasicHTML_Click(object sender, EventArgs e)
+		{
+			SaveFileDialog dialog = new SaveFileDialog();
+			dialog.Filter = Translation.GetTranslation("armyExportBasicHtmlFilter", "HTML pages") + "|*.html";
+			dialog.Title = Translation.GetTranslation("exportArmyDialog", "Export army");
+
+			DialogResult dr = dialog.ShowDialog(this);
+
+			if (dr == DialogResult.OK)
+			{
+				Army army = CurrentArmy;
+				string filePath = dialog.FileName;
+				log.DebugFormat("Exporting {0} to {1} as basic HTML", army.Name, filePath);
+				WarFoundryHtmlExporter.GetDefault().ExportArmy(army, filePath);
+			}
+		}
+
+		private void FrmMain_Load(object sender, EventArgs e)
+		{
+			string gameSystemID = Preferences.GetStringProperty("currSystem");
+
+			if (gameSystemID != null && !"".Equals(gameSystemID))
+			{
+				log.Debug("Attempting to load current game system from properties");
+				GameSystem sys = WarFoundryLoader.GetDefault().GetGameSystem(gameSystemID);
+
+				if (sys != null)
+				{
+					WarFoundryCore.CurrentGameSystem = sys;
+					log.InfoFormat("Loaded game system {0} from properties", gameSystemID);
+				}
+			}
+		}
+
+		private void miAbout_Click(object sender, EventArgs e)
+		{
+			FrmAbout about = new FrmAbout();
+			about.ShowDialog(this);
 		}
 
 		private void miPreferences_Click(object sender, EventArgs e)
 		{
 			FrmPreferences prefsForm = new FrmPreferences(Preferences);
 			prefsForm.Show(this);
-		}
-	}
-}
+		}
+	}
+}
--- a/FrmPreferences.Designer.cs	Tue Apr 13 20:02:49 2010 +0000
+++ b/FrmPreferences.Designer.cs	Wed Apr 14 19:42:45 2010 +0000
@@ -32,8 +32,8 @@
 			this.languagesGroup = new System.Windows.Forms.GroupBox();
 			this.lblLanguage = new IBBoard.Windows.Forms.IBBLabel();
 			this.languageList = new System.Windows.Forms.ComboBox();
-			this.bttnOkay = new System.Windows.Forms.Button();
-			this.bttnCancel = new System.Windows.Forms.Button();
+			this.bttnOkay = new IBBoard.Windows.Forms.IBBButton();
+			this.bttnCancel = new IBBoard.Windows.Forms.IBBButton();
 			this.languagesGroup.SuspendLayout();
 			this.SuspendLayout();
 			// 
@@ -115,7 +115,7 @@
 		private System.Windows.Forms.GroupBox languagesGroup;
 		private System.Windows.Forms.ComboBox languageList;
 		private IBBoard.Windows.Forms.IBBLabel lblLanguage;
-		private System.Windows.Forms.Button bttnOkay;
-		private System.Windows.Forms.Button bttnCancel;
+		private IBBoard.Windows.Forms.IBBButton bttnOkay;
+		private IBBoard.Windows.Forms.IBBButton bttnCancel;
 	}
 }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/translations/de.translation	Wed Apr 14 19:42:45 2010 +0000
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<translations xmlns="http://ibboard.co.uk/translation" lang="de">
+	<translation id="menuFile">Datei</translation>
+	<translation id="menuEdit">Editieren</translation>
+	<translation id="menuHelp">Hilfe</translation>
+	<translation id="miNewArmy">Neue Armee</translation>
+	<translation id="miOpenArmy">Laden</translation>
+	<translation id="miSaveArmy">Speichern</translation>
+	<translation id="miSaveArmyAs">Speichern unter...</translation>
+	<translation id="miExportArmyAs">Exportieren</translation>
+	<translation id="miExportArmyAsBasicHTML">Einfaches HTML</translation>
+	<translation id="miCloseArmy">Schließen</translation>
+	<translation id="miReloadFiles">Dateien neu laden</translation>
+	<translation id="miExit">Beenden</translation>
+	<translation id="miUndo">Rückgängig</translation>
+	<translation id="miRedo">Wiederholen</translation>
+	<translation id="miAbout">Über</translation>
+	<translation id="bttnOkay">OK</translation>
+	<translation id="bttnCancel">Abbrechen</translation>
+	<translation id="bttnNewArmy">Neue Armee</translation>
+	<translation id="bttnOpenArmy">Armee laden</translation>
+	<translation id="bttnSaveArmy">Armee speichern</translation>
+	<translation id="bttnUndo">Rückgängig</translation>
+	<translation id="bttnRedo">Wiederholen</translation>
+	<translation id="ArmyTree">Armeebaum</translation>
+	<translation id="miDeleteUnit">Einheit &amp;löschen</translation>
+	<translation id="miEditUnit">Einheit &amp;bearbeiten</translation>
+	<translation id="openArmyDialog">Lade Armee</translation>
+	<translation id="saveArmyDialog">Speichere Armee</translation>
+	<translation id="armyFileFilter">WarFoundry Armeedateien (*.army)</translation>
+	<translation id="statusPanelPoints">{0} von {1} Punkten</translation>
+	<translation id="statusPanelPointsToolTip">Aktueller Armeewert</translation>
+	<translation id="defaultUnitName">Einheit aus {0} {1}</translation>
+	<translation id="FrmNewArmy">Armee erstellen</translation>
+	<translation id="lblGameSystem">Spielsystem:</translation>
+	<translation id="lblRaceList">Rasse/Volk:</translation>
+	<translation id="lblArmyName">Armeename:</translation>
+	<translation id="lblArmySize">Armeegröße:</translation>
+	<translation id="bttnSelectRace">Neue Armee erstellen</translation>
+	<translation id="FrmNewUnit">Füge eine neue {0}-Auswahl hinzu</translation>
+	<translation id="lblUnitList">Einheiten:</translation>
+	<translation id="bttnSelectUnit">Einheit hinzufügen</translation>
+	<translation id="FrmNewUnitEquipment">Neue Ausrüstung für {0}</translation>
+	<translation id="lblAmount">Anzahl:</translation>
+	<translation id="lblItem">Ausrüstung:</translation>
+	<translation id="rbEquipAll">Alle ausrüsten</translation>
+	<translation id="equipPercentageTooLarge">Die gewählte Prozentzahl ({0}%) ist größer als das Maximum für diesen Ausrüstungsgegenstand ({1}%). Das Maximum wird stattdessen genutzt.</translation>
+	<translation id="equipPercentageTooLargeTitle">Prozentzahl zu groß</translation>
+	<translation id="equipPercentageTooSmall">Die gewählte Prozentzahl ({0}%) ist kleiner als das Minimum für diesen Ausrüstungsgegenstand ({1}%). Das Minimum wird stattdessen genutzt.</translation>
+	<translation id="equipPercentageTooSmallTitle">Prozentzahl zu klein</translation>
+	<translation id="equipNumberTooLarge">Die gewählte Anzahl ({0}%) ist größer als das Maximum für diesen Ausrüstungsgegenstand ({1}%). Das Maximum wird stattdessen genutzt.</translation>
+	<translation id="equipNumberTooLargeTitle">Anzahl zu groß</translation>
+	<translation id="equipNumberTooSmall">Die gewählte Anzahl ({0}%) ist kleiner als das Minimum für diesen Ausrüstungsgegenstand ({1}%). Das Minimum wird stattdessen genutzt.</translation>
+	<translation id="equipNumberTooSmallTitle">Anzahl zu klein</translation>
+	<translation id="FrmEditUnitEquipment">Bearbeite {0} für {1}</translation>
+	<translation id="FrmAbout">Über WarFoundry</translation>
+	<translation id="lblVersion">Version: {0}</translation>
+	<translation id="lblDevelopers">Entwickler:</translation>
+	<translation id="lblThanks">Vielen Dank an:</translation>
+	<translation id="FrmUnit">{0}</translation>
+	<translation id="lblUnitSize">Einheitsgröße:</translation>
+	<translation id="lblEquip">Ausrüstung:</translation>
+	<translation id="bttnAddWeapon">Hinzufügen</translation>
+	<translation id="lblAbilities">Fähigkeiten:</translation>
+	<translation id="lblNotes">Notizen:</translation>
+	<translation id="bttnRemoveWeapon">Entfernen</translation>
+	<translation id="bttnReplaceWeapon">Ersetzen</translation>
+	<translation id="bttnEditWeapon">Bearbeiten</translation>
+	<translation id="equipmentAmountWithCost">{0} ({1} für je {2} Punkt(e))</translation>
+	<translation id="equipmentAmountWithZeroCost">{0} ({1} kostenlos)</translation>
+	<translation id="equipmentChoiceAmountAll">Für alle ({1})</translation>
+	<translation id="equipmentChoiceAmountPercentage">Für {0}% ({1})</translation>
+	<translation id="equipmentChoiceAmountNumber">{0}</translation>
+	<translation id="InvalidRaceFileBoxTitle">Ungültige Rassen-/Volksdatei</translation>
+	<translation id="InvalidArmyFileBoxTitle">Ungültige Armeedatei</translation>
+	<translation id="SaveChangesQuestion">Die Armee "{0}" wurde geändert.
+Änderungen vorm Schließen der Armee speichern?</translation>
+	<translation id="SaveChangesTitle">Nicht gespeicherte Änderungen</translation>
+	<translation id="SaveFailed">WarFoundry konnte die Datei nicht speichern. Die Logdatei kann Hinweise zu dem Problem enthalten.</translation>
+	<translation id="SaveFailedTitle">Speichern fehlgeschlagen</translation>
+	<translation id="armyHtmlOutputBodyHeader">{0} - {1} Punkte</translation>
+	<translation id="armyHtmlOutputTableHeaderUnitName">Name</translation>
+	<translation id="armyHtmlOutputTableHeaderUnitNotes">Anmerkungen</translation>
+	<translation id="armyHtmlOutputTableHeaderUnitPoints">Punkte</translation>
+	<translation id="armyHtmlExportEquipAmountAll">alle ({1})</translation>
+	<translation id="armyHtmlExportEquipAmountPercentage">{0}% ({1})</translation>
+	<translation id="armyHtmlExportEquipAmountNumber">{0}</translation>
+	<translation id="armyHtmlExportEquipAmountRatio">{0} für {1}</translation>
+	<translation id="equipmentAmountAll">alle ({1})</translation>
+	<translation id="equipmentAmountPercentage">{0}% ({1})</translation>
+	<translation id="equipmentAmountNumber">{0}</translation>
+	<translation id="setEquipmentAmountCommandDescription">{0}-Anzahl für {1} auf {2} setzen</translation>
+	<translation id="setEquipmentAmountCommandUndoDescription">{0}-Anzahl für {1} auf {2} setzen</translation>
+	<translation id="replaceUnitEquipmentCommandDescription">{0} mit {1} für {2} ersetzen</translation>
+	<translation id="replaceUnitEquipmentCommandUndoDescription">{0} mit {1} für {2} ersetzen</translation>
+	<translation id="createAndAddUnitCommandDescription">Einheit {0} hinzufügen</translation>
+	<translation id="createAndAddUnitCommandUndoDescription">Einheit {0} entfernen</translation>
+	<translation id="removeUnitCommandDescription">{0} entfernen</translation>
+	<translation id="removeUnitCommandUndoDescription">{0} wieder hinzufügen</translation>
+	<translation id="setUnitNameCommandDescription">"{0}" in "{1}" umbenennen</translation>
+	<translation id="setUnitNameCommandUndoDescription">"{0}" in "{1}" umbenennen</translation>
+	<translation id="setUnitSizeCommandDescription">Größe von {0} auf {1} setzen</translation>
+	<translation id="setUnitSizeCommandUndoDescription">Größe von {0} auf {1} setzen</translation>
+	<translation id="requirementAND">{0}; und {1}</translation>
+	<translation id="requirementOR">{0}; oder {1}</translation>
+	<translation id="requirementUnitExcludes">{0} kann nur gewählt werden, wenn keine der folgenden Auswahlen gewählt werden: {1}</translation>
+	<translation id="requirementUnitMaxNumber">{1} kann nur {0}-mal gewählt werden</translation>
+	<translation id="requirementUnitMinNumber">{1} muss mindestens {0}-mal gewählt werden</translation>
+	<translation id="requirementUnitTypeAtLeastSingle">{1} {0}</translation>
+	<translation id="requirementUnitTypeAtLeastJoiner">{0}, {1}</translation>
+	<translation id="requirementUnitTypeAtLeast">{0} kann nur gewählt werden, wenn folgende Auswahlen gewählt werden: {1}</translation>
+	<translation id="FrmPreferences">Einstellungen</translation>
+	<translation id="languagePrefSection">Sprache</translation>
+	<translation id="lblLanguage">Sprache:</translation>
+	<translation id="languagesGroup">Sprache</translation>	
+</translations>
\ No newline at end of file