changeset 210:694f23814ec2

Re #354: Single-button Add Unit * Make the form translatable * Update FrmArmyTree so it doesn't look out of place (ContextMenuStrip and update the icons) * Add "change selection on right-click" code to solve calculation issues * Hide categories that don't have entries (assume they're not relevant to that race) Also: * Clean up code and replace space indents with tabs
author IBBoard <dev@ibboard.co.uk>
date Sat, 20 Aug 2011 20:58:16 +0100
parents a11faa64c333
children 848fb363a8cb
files FrmArmyTree.cs FrmArmyTree.resx FrmMain.cs FrmNewUnitFromTree.Designer.cs FrmNewUnitFromTree.cs IBBoard.WarFoundry.GUI.WinForms.csproj Properties/Resources.Designer.cs Properties/Resources.resx Resources/edit-delete.png Resources/edit-edit.png translations/en.translation
diffstat 11 files changed, 752 insertions(+), 714 deletions(-) [+]
line diff
     1.1 --- a/FrmArmyTree.cs	Sat Aug 20 17:05:45 2011 +0100
     1.2 +++ b/FrmArmyTree.cs	Sat Aug 20 20:58:16 2011 +0100
     1.3 @@ -25,9 +25,9 @@
     1.4  		private System.Windows.Forms.TreeView treeView;
     1.5  		private IContainer components;
     1.6  		private Dictionary<string, TreeNode> nodes;
     1.7 -		private System.Windows.Forms.ContextMenu contextMenu;
     1.8 -		private IBBMenuItem miDeleteUnit;
     1.9 -		private IBBMenuItem miEditUnit;
    1.10 +		private System.Windows.Forms.ContextMenuStrip contextMenu;
    1.11 +		private IBBToolStripMenuItem miDeleteUnit;
    1.12 +		private IBBToolStripMenuItem miEditUnit;
    1.13  		
    1.14  		private ObjectAddDelegate UnitAddedMethod;
    1.15  		private ObjectRemoveDelegate UnitRemovedMethod;
    1.16 @@ -37,11 +37,11 @@
    1.17  		private IBBToolBarButton bttnDelete;
    1.18  		private ImageList imageList;
    1.19  		private CommandStack commandStack;
    1.20 -        public GameSystem CurrentGameSystem
    1.21 -        {
    1.22 -            get { return WarFoundryCore.CurrentGameSystem; }
    1.23 -            set { WarFoundryCore.CurrentGameSystem = value; }
    1.24 -        }
    1.25 +		public GameSystem CurrentGameSystem
    1.26 +		{
    1.27 +			get { return WarFoundryCore.CurrentGameSystem; }
    1.28 +			set { WarFoundryCore.CurrentGameSystem = value; }
    1.29 +		}
    1.30  
    1.31  		public FrmArmyTree(CommandStack cmdStack)
    1.32  		{
    1.33 @@ -68,14 +68,15 @@
    1.34  				ControlTranslator.TranslateComponent(comp);
    1.35  			}
    1.36  
    1.37 -			foreach (IBBMenuItem mi in contextMenu.MenuItems)
    1.38 +			foreach (IBBToolStripMenuItem mi in contextMenu.Items)
    1.39  			{
    1.40 -                ControlTranslator.TranslateComponent(mi);
    1.41 +				ControlTranslator.TranslateComponent(mi);
    1.42  			}
    1.43 -            foreach (TreeNode node in nodes.Values)
    1.44 -            {
    1.45 -                node.Text = CreateNodeName((ICostedWarFoundryObject)node.Tag);
    1.46 -            }
    1.47 +
    1.48 +			foreach (TreeNode node in nodes.Values)
    1.49 +			{
    1.50 +				node.Text = CreateNodeName((ICostedWarFoundryObject)node.Tag);
    1.51 +			}
    1.52  		}
    1.53  
    1.54  		/// <summary>
    1.55 @@ -102,100 +103,108 @@
    1.56  		/// </summary>
    1.57  		private void InitializeComponent()
    1.58  		{
    1.59 -            this.components = new System.ComponentModel.Container();
    1.60 -            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmArmyTree));
    1.61 -            this.contextMenu = new System.Windows.Forms.ContextMenu();
    1.62 -            this.miEditUnit = new IBBoard.Windows.Forms.IBBMenuItem();
    1.63 -            this.miDeleteUnit = new IBBoard.Windows.Forms.IBBMenuItem();
    1.64 -            this.imageList = new System.Windows.Forms.ImageList(this.components);
    1.65 -            this.toolBar = new System.Windows.Forms.ToolBar();
    1.66 -            this.bttnEdit = new IBBoard.Windows.Forms.IBBToolBarButton();
    1.67 -            this.bttnDelete = new IBBoard.Windows.Forms.IBBToolBarButton();
    1.68 -            this.treeView = new System.Windows.Forms.TreeView();
    1.69 -            this.SuspendLayout();
    1.70 -            // 
    1.71 -            // contextMenu
    1.72 -            // 
    1.73 -            this.contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    1.74 -            this.miEditUnit,
    1.75 -            this.miDeleteUnit});
    1.76 -            this.contextMenu.Popup += new System.EventHandler(this.contextMenu_Popup);
    1.77 -            // 
    1.78 -            // miEditUnit
    1.79 -            // 
    1.80 -            this.miEditUnit.Index = 0;
    1.81 -            this.miEditUnit.Text = "&edit unit";
    1.82 -            this.miEditUnit.Click += new System.EventHandler(this.miEdit_Click);
    1.83 -            // 
    1.84 -            // miDeleteUnit
    1.85 -            // 
    1.86 -            this.miDeleteUnit.Index = 1;
    1.87 -            this.miDeleteUnit.Text = "&delete unit";
    1.88 -            this.miDeleteUnit.Click += new System.EventHandler(this.miDelete_Click);
    1.89 -            // 
    1.90 -            // imageList
    1.91 -            // 
    1.92 -            this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
    1.93 -            this.imageList.TransparentColor = System.Drawing.Color.Transparent;
    1.94 -            this.imageList.Images.SetKeyName(0, "gtk-edit.png");
    1.95 -            this.imageList.Images.SetKeyName(1, "edit-delete.png");
    1.96 -            // 
    1.97 -            // toolBar
    1.98 -            // 
    1.99 -            this.toolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
   1.100 -            this.bttnEdit,
   1.101 -            this.bttnDelete});
   1.102 -            this.toolBar.ButtonSize = new System.Drawing.Size(16, 16);
   1.103 -            this.toolBar.DropDownArrows = true;
   1.104 -            this.toolBar.ImageList = this.imageList;
   1.105 -            this.toolBar.Location = new System.Drawing.Point(0, 0);
   1.106 -            this.toolBar.Name = "toolBar";
   1.107 -            this.toolBar.ShowToolTips = true;
   1.108 -            this.toolBar.Size = new System.Drawing.Size(240, 28);
   1.109 -            this.toolBar.TabIndex = 3;
   1.110 -            this.toolBar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar_ButtonClick);
   1.111 -            // 
   1.112 -            // bttnEdit
   1.113 -            // 
   1.114 -            this.bttnEdit.Enabled = false;
   1.115 -            this.bttnEdit.ImageIndex = 0;
   1.116 -            this.bttnEdit.Name = "bttnEdit";
   1.117 -            // 
   1.118 -            // bttnDelete
   1.119 -            // 
   1.120 -            this.bttnDelete.Enabled = false;
   1.121 -            this.bttnDelete.ImageIndex = 1;
   1.122 -            this.bttnDelete.Name = "bttnDelete";
   1.123 -            // 
   1.124 -            // treeView
   1.125 -            // 
   1.126 -            this.treeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
   1.127 -                        | System.Windows.Forms.AnchorStyles.Left)
   1.128 -                        | System.Windows.Forms.AnchorStyles.Right)));
   1.129 -            this.treeView.ContextMenu = this.contextMenu;
   1.130 -            this.treeView.FullRowSelect = true;
   1.131 -            this.treeView.Location = new System.Drawing.Point(0, 28);
   1.132 -            this.treeView.Name = "treeView";
   1.133 -            this.treeView.Size = new System.Drawing.Size(240, 250);
   1.134 -            this.treeView.TabIndex = 0;
   1.135 -            this.treeView.DoubleClick += new System.EventHandler(this.treeView_DoubleClick);
   1.136 -            this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterSelect);
   1.137 -            this.treeView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.treeView_MouseDown);
   1.138 -            // 
   1.139 -            // FrmArmyTree
   1.140 -            // 
   1.141 -            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
   1.142 -            this.ClientSize = new System.Drawing.Size(240, 277);
   1.143 -            this.ControlBox = false;
   1.144 -            this.Controls.Add(this.toolBar);
   1.145 -            this.Controls.Add(this.treeView);
   1.146 -            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
   1.147 -            this.MaximizeBox = false;
   1.148 -            this.MinimizeBox = false;
   1.149 -            this.Name = "FrmArmyTree";
   1.150 -            this.Text = "FrmArmyTree";
   1.151 -            this.ResumeLayout(false);
   1.152 -            this.PerformLayout();
   1.153 +			this.components = new System.ComponentModel.Container();
   1.154 +			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmArmyTree));
   1.155 +			this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
   1.156 +			this.miDeleteUnit = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   1.157 +			this.imageList = new System.Windows.Forms.ImageList(this.components);
   1.158 +			this.toolBar = new System.Windows.Forms.ToolBar();
   1.159 +			this.bttnEdit = new IBBoard.Windows.Forms.IBBToolBarButton();
   1.160 +			this.bttnDelete = new IBBoard.Windows.Forms.IBBToolBarButton();
   1.161 +			this.treeView = new System.Windows.Forms.TreeView();
   1.162 +			this.miEditUnit = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   1.163 +			this.contextMenu.SuspendLayout();
   1.164 +			this.SuspendLayout();
   1.165 +			// 
   1.166 +			// contextMenu
   1.167 +			// 
   1.168 +			this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
   1.169 +			this.miEditUnit,
   1.170 +			this.miDeleteUnit});
   1.171 +			this.contextMenu.Name = "contextMenu";
   1.172 +			this.contextMenu.Size = new System.Drawing.Size(137, 48);
   1.173 +			this.contextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenu_Opening);
   1.174 +			// 
   1.175 +			// miDeleteUnit
   1.176 +			// 
   1.177 +			this.miDeleteUnit.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_delete;
   1.178 +			this.miDeleteUnit.Name = "miDeleteUnit";
   1.179 +			this.miDeleteUnit.Size = new System.Drawing.Size(136, 22);
   1.180 +			this.miDeleteUnit.Text = "&delete unit";
   1.181 +			this.miDeleteUnit.Click += new System.EventHandler(this.miDelete_Click);
   1.182 +			// 
   1.183 +			// imageList
   1.184 +			// 
   1.185 +			this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
   1.186 +			this.imageList.TransparentColor = System.Drawing.Color.Transparent;
   1.187 +			this.imageList.Images.SetKeyName(0, "edit-edit.png");
   1.188 +			this.imageList.Images.SetKeyName(1, "edit-delete.png");
   1.189 +			// 
   1.190 +			// toolBar
   1.191 +			// 
   1.192 +			this.toolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
   1.193 +			this.bttnEdit,
   1.194 +			this.bttnDelete});
   1.195 +			this.toolBar.ButtonSize = new System.Drawing.Size(16, 16);
   1.196 +			this.toolBar.DropDownArrows = true;
   1.197 +			this.toolBar.ImageList = this.imageList;
   1.198 +			this.toolBar.Location = new System.Drawing.Point(0, 0);
   1.199 +			this.toolBar.Name = "toolBar";
   1.200 +			this.toolBar.ShowToolTips = true;
   1.201 +			this.toolBar.Size = new System.Drawing.Size(240, 28);
   1.202 +			this.toolBar.TabIndex = 3;
   1.203 +			this.toolBar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar_ButtonClick);
   1.204 +			// 
   1.205 +			// bttnEdit
   1.206 +			// 
   1.207 +			this.bttnEdit.Enabled = false;
   1.208 +			this.bttnEdit.ImageIndex = 0;
   1.209 +			this.bttnEdit.Name = "bttnEdit";
   1.210 +			// 
   1.211 +			// bttnDelete
   1.212 +			// 
   1.213 +			this.bttnDelete.Enabled = false;
   1.214 +			this.bttnDelete.ImageIndex = 1;
   1.215 +			this.bttnDelete.Name = "bttnDelete";
   1.216 +			// 
   1.217 +			// treeView
   1.218 +			// 
   1.219 +			this.treeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
   1.220 +						| System.Windows.Forms.AnchorStyles.Left)
   1.221 +						| System.Windows.Forms.AnchorStyles.Right)));
   1.222 +			this.treeView.ContextMenuStrip = this.contextMenu;
   1.223 +			this.treeView.FullRowSelect = true;
   1.224 +			this.treeView.Location = new System.Drawing.Point(0, 28);
   1.225 +			this.treeView.Name = "treeView";
   1.226 +			this.treeView.Size = new System.Drawing.Size(240, 250);
   1.227 +			this.treeView.TabIndex = 0;
   1.228 +			this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterSelect);
   1.229 +			this.treeView.DoubleClick += new System.EventHandler(this.treeView_DoubleClick);
   1.230 +			this.treeView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.treeView_MouseDown);
   1.231 +			// 
   1.232 +			// miEditUnit
   1.233 +			// 
   1.234 +			this.miEditUnit.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_edit;
   1.235 +			this.miEditUnit.Name = "miEditUnit";
   1.236 +			this.miEditUnit.Size = new System.Drawing.Size(136, 22);
   1.237 +			this.miEditUnit.Text = "&edit unit";
   1.238 +			this.miEditUnit.Click += new System.EventHandler(this.miEdit_Click);
   1.239 +			// 
   1.240 +			// FrmArmyTree
   1.241 +			// 
   1.242 +			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
   1.243 +			this.ClientSize = new System.Drawing.Size(240, 277);
   1.244 +			this.ControlBox = false;
   1.245 +			this.Controls.Add(this.toolBar);
   1.246 +			this.Controls.Add(this.treeView);
   1.247 +			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
   1.248 +			this.MaximizeBox = false;
   1.249 +			this.MinimizeBox = false;
   1.250 +			this.Name = "FrmArmyTree";
   1.251 +			this.Text = "FrmArmyTree";
   1.252 +			this.contextMenu.ResumeLayout(false);
   1.253 +			this.ResumeLayout(false);
   1.254 +			this.PerformLayout();
   1.255  
   1.256  		}
   1.257  		#endregion
   1.258 @@ -247,7 +256,7 @@
   1.259  		
   1.260  		private string CreateNodeName(ICostedWarFoundryObject obj)
   1.261  		{
   1.262 -            return Translation.GetTranslation("treeNodeText", "{0} ({1} pts)", obj.Name, obj.Points, CurrentGameSystem.GetPointsAbbrev(obj.Points));
   1.263 +			return Translation.GetTranslation("treeNodeText", "{0} ({1} pts)", obj.Name, obj.Points, CurrentGameSystem.GetPointsAbbrev(obj.Points));
   1.264  		}
   1.265  
   1.266  		private void NodePointsValueChanged(WarFoundryObject obj, double oldValue, double newValue)
   1.267 @@ -337,25 +346,10 @@
   1.268  			}
   1.269  		}
   1.270  
   1.271 -
   1.272 -		private void contextMenu_Popup(object sender, System.EventArgs e)
   1.273 +		private void contextMenu_Opening(object sender, CancelEventArgs e)
   1.274  		{
   1.275  			TreeNode node = treeView.SelectedNode;
   1.276 -
   1.277 -			if (node!=null && node.Tag is Unit)
   1.278 -			{
   1.279 -				foreach(MenuItem item in contextMenu.MenuItems)
   1.280 -				{
   1.281 -					item.Visible = true;
   1.282 -				}
   1.283 -			}
   1.284 -			else
   1.285 -			{
   1.286 -				foreach(MenuItem item in contextMenu.MenuItems)
   1.287 -				{
   1.288 -					item.Visible = false;
   1.289 -				}
   1.290 -			}
   1.291 +			e.Cancel = (node == null || !(node.Tag is Unit));
   1.292  		}
   1.293  
   1.294  		private void treeView_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
   1.295 @@ -363,15 +357,7 @@
   1.296  			if (e.Button == MouseButtons.Right)
   1.297  			{
   1.298  				TreeNode tn = treeView.GetNodeAt(e.X, e.Y);
   1.299 -
   1.300 -				if (tn!=null)
   1.301 -				{
   1.302 -					treeView.SelectedNode = tn;
   1.303 -				}
   1.304 -				else
   1.305 -				{
   1.306 -					treeView.SelectedNode = null;
   1.307 -				}
   1.308 +				treeView.SelectedNode = tn;
   1.309  			}
   1.310  		}
   1.311  
     2.1 --- a/FrmArmyTree.resx	Sat Aug 20 17:05:45 2011 +0100
     2.2 +++ b/FrmArmyTree.resx	Sat Aug 20 20:58:16 2011 +0100
     2.3 @@ -112,54 +112,54 @@
     2.4      <value>2.0</value>
     2.5    </resheader>
     2.6    <resheader name="reader">
     2.7 -    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     2.8 +    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     2.9    </resheader>
    2.10    <resheader name="writer">
    2.11 -    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    2.12 +    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    2.13    </resheader>
    2.14 -  <metadata name="contextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    2.15 +  <metadata name="contextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    2.16      <value>17, 17</value>
    2.17    </metadata>
    2.18 -  <metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    2.19 +  <metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    2.20      <value>133, 17</value>
    2.21    </metadata>
    2.22    <data name="imageList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
    2.23      <value>
    2.24 -        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
    2.25 +        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
    2.26          LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
    2.27 -        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABO
    2.28 +        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABA
    2.29          BwAAAk1TRnQBSQFMAgEBAgEAAQQBAAEEAQABEAEAARABAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFA
    2.30 -        AwABEAMAAQEBAAEYBgABDEUAAagCVgGRAZQBkwGtAbABrwYAAZABlAGSAZ4BnwGeAZ8BjAGKBgABwQFE
    2.31 -        AUMBjgJjAa0BZAFjbAABpAFbAVkBhgGLAYkBhQGKAYgBhQGKAYgBhQGKAYgBhAGJAYcBgwGIAYYBggGH
    2.32 -        AYUBgwGIAYYBgwGIAYYBgwGIAYYBowFaAVkB0ggAAY0BjwGOA/oBlgGUAZMBogGDAYIBnAGSAZEBlgGa
    2.33 -        AZgB7ALhAaEBegF4AZsBngGdAZgBmwGaAYsBjgGNAfkC3gGgAmxsAAOBCf8D/gP3A+kD4gPlA+oD7wF/
    2.34 -        AYQBggHOCAABqAJWAYsBfwF+AfUC8gGZAZwBmwGrAa0BrAGLAXsBeAHdAc8BzgGoAnsBzQGxAbABmAGb
    2.35 -        AZoB6QLdAZwBigGJAboCPWwAA4ED/wPsA+0D7gMAAQIBWQGPAZYBqQGzA8IBygLLA+IBewF/AX0BzAsA
    2.36 -        AYoBgAF/Ac0BgQGAAYoBfAF5AcUCswGHAYABfQHLAbwBuwGgAY8BjgHCAqgBfAGAAX8B4QLXAY8BhgGF
    2.37 -        bwADgQP/BuwD7QECAVkBjwEmAUIBTAE2AVcBawECAVkBjwGvAcEBzAPvAX8BhAGCAc8LAAJ0AXMByAG5
    2.38 -        AbgBgQFzAXABogGRApACigGwAaIBoQGQAYUBhAGyAZ8BngF8AYABfwG6AaoBqQF5AXQBc28AA4ED/wbs
    2.39 -        Bu0BOQFbAXABigGrAcIBVQGFAaMBAgFZAY8BygHcAecBhAGJAYcB0gIAAdIIAAFqAW4BbQHMAskBagJk
    2.40 -        AasBqAGnAW0BbwFuAa4BrQGsAWwBbQFsAbEBrwGuAW8BcQFwAbICsAFtAW8Bbm8AA4ED/wPrBuwD7QEC
    2.41 -        AVkBjwHEAeUB7QFkAZ8ByAFXAYQBoAECAVkBjwFqAYABiQMAAdICAAGaATcBGAGHAUoBIAGHAUoBIAGH
    2.42 -        AUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGH
    2.43 -        AUoBIAGHAUoBIAGaATcBGGYAA4ED/wbrBuwD7QECAVkBjwHFAeYB7QFpAaoBzwFWAYMBoAECAVkBjwGp
    2.44 -        ARIBHQMAAYcBSgEgAd0BuwGcAc8BnwFyAc8BnwFyAc8BnwFyAc8BnwFyAc8BnwFyAc8BnwFyAc8BnwFy
    2.45 -        Ac8BnwFyAc8BnwFyAc8BnwFyAc8BnwFyAc8BnwFyAd0BuwGcAYcBSgEgZgADgQP/BusJ7APtAQIBWQGP
    2.46 -        AccB6wHvAWoBrAHSAVcBhwGkAQIBWQGPAakBEgEdAYcBSgEgAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGc
    2.47 -        Ad0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGc
    2.48 -        AYcBSgEgZgADgQP/A+oG6wzsAQIBWQGPAccB6wHvAWoBrAHSAVYBgQGfAQIBWQGPAYcBSgEgAd0BuwGc
    2.49 +        AwABEAMAAQEBAAEYBgABDEUAAagCqgGRAZQBkwGtAbABrwYAAZABlAGSAZ4BoQGgAZ8BogGgBgABwQHC
    2.50 +        AcEBjgKQAa0BrwGubAABpAGnAaUBhgGLAYkBhQGKAYgBhQGKAYgBhQGKAYgBhAGJAYcBgwGIAYYBggGH
    2.51 +        AYUBgwGIAYYBgwGIAYYBgwGIAYYBowGmAaUD0gYAAY0BkQGQA/oBlgGZAZgBogGlAaQBnAGfAZ4BlgGa
    2.52 +        AZgB7ALtAaEBpQGjAZsBngGdAZgBmwGaAYsBjgGNA/kBoAKjbAADgQn/A/4D9wPpA+ID5QPqA+8BfwGE
    2.53 +        AYIDzgYAAagCqgGLAY8BjgP1AZkBnAGbAasBrQGsAYsBjwGMAd0B3gHdAagCqgHNAc8BzgGYAZsBmgPp
    2.54 +        AZwBnwGeAboCu2wAA4ED/wPsA+0D7gMAAQIBWQGPAZYBqQGzA8IBygLLA+IBewF/AX0DzAkAAYoBjQGM
    2.55 +        Ac0BzgHNAYoBjwGMA8UBhwGMAYkBywHNAcwBoAGiAaEDwgF8AYABfwHhAuIBjwGSAZFvAAOBA/8G7APt
    2.56 +        AQIBWQGPASYBQgFMATYBVwFrAQIBWQGPAa8BwQHMA+8BfwGEAYIDzwkAAXQBeAF3AcgBygHJAYEBhgGD
    2.57 +        AaIBowGiAZACkQGwAbEBsAGQAZEBkAGyAbMBsgF8AYABfwG6AbsBugF5AXwBe28AA4ED/wbsBu0BOQFb
    2.58 +        AXABigGrAcIBVQGFAaMBAgFZAY8BygHcAecBhAGJAYcG0gYAAWoBbgFtAcwCzQFqAm0BqwGtAawBbQFw
    2.59 +        AW8BrgGwAa8BbAFvAW4BsQGzAbIBbwFzAXIBsgKzAW0BcQFwbwADgQP/A+sG7APtAQIBWQGPAcQB5QHt
    2.60 +        AWQBnwHIAVcBhAGgAQIBWQGPAWoBgAGJAwAD0gGaAWsBTAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGH
    2.61 +        AUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGHAUoBIAGa
    2.62 +        AWsBTGYAA4ED/wbrBuwD7QECAVkBjwHFAeYB7QFpAaoBzwFWAYMBoAECAVkBjwGpAbsBxgMAAYcBSgEg
    2.63 +        Ad0BuwGcAc8BnwFyAc8BnwFyAc8BnwFyAc8BnwFyAc8BnwFyAc8BnwFyAc8BnwFyAc8BnwFyAc8BnwFy
    2.64 +        Ac8BnwFyAc8BnwFyAc8BnwFyAd0BuwGcAYcBSgEgZgADgQP/BusJ7APtAQIBWQGPAccB6wHvAWoBrAHS
    2.65 +        AVcBhwGkAQIBWQGPAakBuwHGAYcBSgEgAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGc
    2.66 +        Ad0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAd0BuwGcAYcBSgEgZgADgQP/
    2.67 +        A+oG6wzsAQIBWQGPAccB6wHvAWoBrAHSAVYBgwGhAQIBWQGPAYcBSgEgAd0BuwGcAcoBigFYAcoBigFY
    2.68          AcoBigFYAcoBigFYAcoBigFYAcoBigFYAcoBigFYAcoBigFYAcoBigFYAcoBigFYAcoBigFYAcoBigFY
    2.69 -        AcoBigFYAcoBigFYAd0BuwGcAYcBSgEgZgADgQP/BuoG6wnsAe8C8AECAVkBjwHGAeoB7gFxAa0BzwEC
    2.70 -        AVkBjwGHAUoBIAHdAbsBnAGGAVIBLAGGAVEBKwGGAVEBKwGGAVEBKwGGAVEBKwGGAVEBKwGGAVIBLAGG
    2.71 -        AVIBLAGGAVIBLAGGAVIBLAGGAVIBLAGGAVIBLAHdAbsBnAGHAUoBIGYAA4ED/wPsBuoM6wHvAvAD/wEC
    2.72 -        AVkBjwECAVkBjwGIASABNAGHAUoBIAHdAbsBnAFqAVsBTgPJCZwSmwFqAVsBTgHdAbsBnAGHAUoBIGYA
    2.73 -        A4Ee/wGFAYoBiAYAAYcBSgEgAd0BuwGcAXcBfAF6A9kMvQm8A78DwAF3AXwBegHdAbsBnAGHAUoBIGYA
    2.74 -        AbECZR6BAaMBYAFfBgABrQElARABhwFKASABhQGKAYgD5wPXDNYG1QPaA9wBhQGKAYgBhwFKASABrQEl
    2.75 -        ARCWAAGFAYoBiAPxCesP6gPpAYUBigGInAABoAFuAW0BhQGKAYgBhQGKAYgBhQGKAYgBhQGKAYgBhQGK
    2.76 -        AYgBhQGKAYgBhQGKAYgBhQGKAYgBhQGKAYgBhQGKAYgBoAFuAW1mAAFCAU0BPgcAAT4DAAEoAwABQAMA
    2.77 -        ARADAAEBAQABAQUAAYAXAAP/AQAC/wGMAWMEAAHAAQEBgAEDBAABwAEBAYABAwQAAcABAQHAAQcEAAHA
    2.78 -        AQEBwAEHBAABwAEAAcABBwQAAcABAgYAAcABAQYAAcAHAAHABwABwAcAAcAHAAHAAQMGAAHAAQMGAAL/
    2.79 -        AcABAwQAAv8BwAEDBAAL
    2.80 +        Ad0BuwGcAYcBSgEgZgADgQP/BuoG6wnsAe8C8AECAVkBjwHGAeoB7gFxAa0BzwECAVkBjwGHAUoBIAHd
    2.81 +        AbsBnAGGAVIBLAGGAVEBKwGGAVEBKwGGAVEBKwGGAVEBKwGGAVEBKwGGAVIBLAGGAVIBLAGGAVIBLAGG
    2.82 +        AVIBLAGGAVIBLAGGAVIBLAHdAbsBnAGHAUoBIGYAA4ED/wPsBuoM6wHvAvAD/wECAVkBjwECAVkBjwGI
    2.83 +        AacBuwGHAUoBIAHdAbsBnAFqAVsBTgPJCZwSmwFqAVsBTgHdAbsBnAGHAUoBIGYAA4Ee/wGFAYoBiAYA
    2.84 +        AYcBSgEgAd0BuwGcAXcBfAF6A9kMvQm8A78DwAF3AXwBegHdAbsBnAGHAUoBIGYAA7EegQGjAaYBpQYA
    2.85 +        Aa0BjwF6AYcBSgEgAYUBigGIA+cD1wzWBtUD2gPcAYUBigGIAYcBSgEgAa0BjwF6lgABhQGKAYgD8Qnr
    2.86 +        D+oD6QGFAYoBiJwAAaABowGiAYUBigGIAYUBigGIAYUBigGIAYUBigGIAYUBigGIAYUBigGIAYUBigGI
    2.87 +        AYUBigGIAYUBigGIAYUBigGIAaABowGiZgABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGA
    2.88 +        FwAD/wEAAv8BjAFjBAABwAEBAYABAwQAAcABAQGAAQMEAAHAAQEBwAEHBAABwAEBAcABBwQAAcABAAHA
    2.89 +        AQcEAAHAAQIGAAHAAQEGAAHABwABwAcAAcAHAAHABwABwAEDBgABwAEDBgAC/wHAAQMEAAL/AcABAwQA
    2.90 +        Cw==
    2.91  </value>
    2.92    </data>
    2.93  </root>
    2.94 \ No newline at end of file
     3.1 --- a/FrmMain.cs	Sat Aug 20 17:05:45 2011 +0100
     3.2 +++ b/FrmMain.cs	Sat Aug 20 20:58:16 2011 +0100
     3.3 @@ -40,13 +40,13 @@
     3.4  	{
     3.5  		private static readonly string AppTitle = "WarFoundry";
     3.6  		internal static readonly string VERSION = "0.1";
     3.7 -        const string DefaultDataDir = "data";
     3.8 -       /* public static string pointsAbbrevSingle;
     3.9 -        public static string pointsAbbrevPlural;
    3.10 -        public static string pointsAbbreviation;
    3.11 -        public static string pointsNameSingle;
    3.12 -        public static string pointsNamePlural;
    3.13 -        public static string pointsName;*/
    3.14 +		const string DefaultDataDir = "data";
    3.15 +	   /* public static string pointsAbbrevSingle;
    3.16 +		public static string pointsAbbrevPlural;
    3.17 +		public static string pointsAbbreviation;
    3.18 +		public static string pointsNameSingle;
    3.19 +		public static string pointsNamePlural;
    3.20 +		public static string pointsName;*/
    3.21  
    3.22  		private Preferences preferences;
    3.23  		private readonly ILog log = LogManager.GetLogger(typeof(FrmMain));
    3.24 @@ -59,7 +59,7 @@
    3.25  		//public FailedUnitRequirementDelegate FailedUnitRequirementMethod;
    3.26  
    3.27  		private FrmArmyTree armyTree;
    3.28 -        private FrmNewUnitFromTree newUnitTree;
    3.29 +		private FrmNewUnitFromTree newUnitTree;
    3.30  		private string loadedFilePath;
    3.31  		private Dictionary<string, FrmUnit> unitWindows;
    3.32  
    3.33 @@ -72,7 +72,7 @@
    3.34  		private IBBoard.Windows.Forms.ColorableStatusBarPanel sbPointsPanel;
    3.35  		private System.Windows.Forms.ContextMenu undoMenu;
    3.36  		private System.Windows.Forms.ContextMenu redoMenu;
    3.37 -        private IBBoard.Windows.Forms.ColorableStatusBar statusBar;
    3.38 +		private IBBoard.Windows.Forms.ColorableStatusBar statusBar;
    3.39  		private MenuStrip menuStrip;
    3.40  		private IBBToolStripMenuItem menuFile;
    3.41  		private IBBToolStripMenuItem miNewArmy;
    3.42 @@ -156,7 +156,7 @@
    3.43  			PointsValueChangedMethod = new DoubleValChangedDelegate(FrmMain_PointsValueChangedMethod);
    3.44  			//FailedUnitRequirementMethod = new FailedUnitRequirementDelegate(FrmMain_FailedUnitRequirement);
    3.45  
    3.46 -            
    3.47 +			
    3.48  			sbErrorPanel.Color = Color.Red;
    3.49  			SetPointsPanelToolTipText();
    3.50  
    3.51 @@ -185,23 +185,23 @@
    3.52  			armyTree.Location = new Point(this.DisplayRectangle.Width - armyTree.Width - 10, 10);
    3.53  		}
    3.54  
    3.55 -        private FrmNewUnitFromTree GetNewUnitTree()
    3.56 -        {
    3.57 -            if (newUnitTree == null || newUnitTree.IsDisposed)
    3.58 -            {
    3.59 -                CreateNewUnitTree();
    3.60 -            }
    3.61 +		private FrmNewUnitFromTree GetNewUnitTree()
    3.62 +		{
    3.63 +			if (newUnitTree == null || newUnitTree.IsDisposed)
    3.64 +			{
    3.65 +				CreateNewUnitTree();
    3.66 +			}
    3.67  
    3.68 -            return newUnitTree;
    3.69 -        }
    3.70 +			return newUnitTree;
    3.71 +		}
    3.72  
    3.73 -        private void CreateNewUnitTree()
    3.74 -        {
    3.75 -            newUnitTree = new FrmNewUnitFromTree();
    3.76 -            newUnitTree.MdiParent = this;
    3.77 -            newUnitTree.StartPosition = FormStartPosition.Manual;
    3.78 -            newUnitTree.Location = new Point(10, 10);
    3.79 -        }
    3.80 +		private void CreateNewUnitTree()
    3.81 +		{
    3.82 +			newUnitTree = new FrmNewUnitFromTree();
    3.83 +			newUnitTree.MdiParent = this;
    3.84 +			newUnitTree.StartPosition = FormStartPosition.Manual;
    3.85 +			newUnitTree.Location = new Point(10, 10);
    3.86 +		}
    3.87  
    3.88  		private void TranslateControls()
    3.89  		{
    3.90 @@ -209,10 +209,10 @@
    3.91  			ControlTranslator.TranslateComponents(components.Components);
    3.92  			ControlTranslator.TranslateComponent(openArmyDialog);
    3.93  			ControlTranslator.TranslateComponent(saveArmyDialog);
    3.94 -            //translate pointspanel and tooltip
    3.95 -            SetPointsPanelToolTipText();
    3.96 -            SetPointsPanelText();
    3.97 -        }
    3.98 +			//translate pointspanel and tooltip
    3.99 +			SetPointsPanelToolTipText();
   3.100 +			SetPointsPanelText();
   3.101 +		}
   3.102  
   3.103  		void TranslationChanged()
   3.104  		{
   3.105 @@ -270,371 +270,371 @@
   3.106  		/// </summary>
   3.107  		private void InitializeComponent()
   3.108  		{
   3.109 -            this.components = new System.ComponentModel.Container();
   3.110 -            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
   3.111 -            this.undoMenu = new System.Windows.Forms.ContextMenu();
   3.112 -            this.redoMenu = new System.Windows.Forms.ContextMenu();
   3.113 -            this.mainMenu = new System.Windows.Forms.MainMenu(this.components);
   3.114 -            this.openArmyDialog = new System.Windows.Forms.OpenFileDialog();
   3.115 -            this.saveArmyDialog = new System.Windows.Forms.SaveFileDialog();
   3.116 -            this.menuStrip = new System.Windows.Forms.MenuStrip();
   3.117 -            this.menuFile = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.118 -            this.miNewArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.119 -            this.miOpenArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.120 -            this.miSaveArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.121 -            this.miSaveArmyAs = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.122 -            this.miExportArmyAs = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.123 -            this.miExportArmyAsBasicHTML = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.124 -            this.miCloseArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.125 -            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
   3.126 -            this.miReloadFiles = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.127 -            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
   3.128 -            this.miExit = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.129 -            this.menuEdit = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.130 -            this.miUndo = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.131 -            this.miRedo = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.132 -            this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
   3.133 -            this.miPreferences = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.134 -            this.menuHelp = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.135 -            this.miAbout = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.136 -            this.mainToolStrip = new System.Windows.Forms.ToolStrip();
   3.137 -            this.bttnNewArmy = new IBBoard.Windows.Forms.IBBToolStripButton();
   3.138 -            this.bttnOpenArmy = new IBBoard.Windows.Forms.IBBToolStripButton();
   3.139 -            this.bttnSaveArmy = new IBBoard.Windows.Forms.IBBToolStripButton();
   3.140 -            this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
   3.141 -            this.bttnUndo = new IBBoard.Windows.Forms.IBBToolStripSplitButton();
   3.142 -            this.bttnRedo = new IBBoard.Windows.Forms.IBBToolStripSplitButton();
   3.143 -            this.catToolStrip = new System.Windows.Forms.ToolStrip();
   3.144 -            this.statusBar = new IBBoard.Windows.Forms.ColorableStatusBar();
   3.145 -            this.sbMainPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel();
   3.146 -            this.sbErrorPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel();
   3.147 -            this.sbPointsPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel();
   3.148 -            this.toolStripPanel = new System.Windows.Forms.ToolStripPanel();
   3.149 -            this.menuStrip.SuspendLayout();
   3.150 -            this.mainToolStrip.SuspendLayout();
   3.151 -            ((System.ComponentModel.ISupportInitialize)(this.sbMainPanel)).BeginInit();
   3.152 -            ((System.ComponentModel.ISupportInitialize)(this.sbErrorPanel)).BeginInit();
   3.153 -            ((System.ComponentModel.ISupportInitialize)(this.sbPointsPanel)).BeginInit();
   3.154 -            this.SuspendLayout();
   3.155 -            // 
   3.156 -            // saveArmyDialog
   3.157 -            // 
   3.158 -            this.saveArmyDialog.Title = "Translatable:saveArmyDialog";
   3.159 -            // 
   3.160 -            // menuStrip
   3.161 -            // 
   3.162 -            this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.163 -            this.menuFile,
   3.164 -            this.menuEdit,
   3.165 -            this.menuHelp});
   3.166 -            this.menuStrip.Location = new System.Drawing.Point(0, 0);
   3.167 -            this.menuStrip.Name = "menuStrip";
   3.168 -            this.menuStrip.Size = new System.Drawing.Size(790, 24);
   3.169 -            this.menuStrip.TabIndex = 6;
   3.170 -            this.menuStrip.Text = "menuStrip1";
   3.171 -            // 
   3.172 -            // menuFile
   3.173 -            // 
   3.174 -            this.menuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.175 -            this.miNewArmy,
   3.176 -            this.miOpenArmy,
   3.177 -            this.miSaveArmy,
   3.178 -            this.miSaveArmyAs,
   3.179 -            this.miExportArmyAs,
   3.180 -            this.miCloseArmy,
   3.181 -            this.toolStripSeparator1,
   3.182 -            this.miReloadFiles,
   3.183 -            this.toolStripSeparator2,
   3.184 -            this.miExit});
   3.185 -            this.menuFile.Name = "menuFile";
   3.186 -            this.menuFile.Size = new System.Drawing.Size(33, 20);
   3.187 -            this.menuFile.Text = "&file";
   3.188 -            // 
   3.189 -            // miNewArmy
   3.190 -            // 
   3.191 -            this.miNewArmy.Name = "miNewArmy";
   3.192 -            this.miNewArmy.Size = new System.Drawing.Size(164, 22);
   3.193 -            this.miNewArmy.Text = "&new army";
   3.194 -            this.miNewArmy.Click += new System.EventHandler(this.miNewArmy_Click);
   3.195 -            // 
   3.196 -            // miOpenArmy
   3.197 -            // 
   3.198 -            this.miOpenArmy.Name = "miOpenArmy";
   3.199 -            this.miOpenArmy.Size = new System.Drawing.Size(164, 22);
   3.200 -            this.miOpenArmy.Text = "&open army";
   3.201 -            this.miOpenArmy.Click += new System.EventHandler(this.miOpenArmy_Click);
   3.202 -            // 
   3.203 -            // miSaveArmy
   3.204 -            // 
   3.205 -            this.miSaveArmy.Enabled = false;
   3.206 -            this.miSaveArmy.Name = "miSaveArmy";
   3.207 -            this.miSaveArmy.Size = new System.Drawing.Size(164, 22);
   3.208 -            this.miSaveArmy.Text = "&save army";
   3.209 -            this.miSaveArmy.Click += new System.EventHandler(this.miSaveArmy_Click);
   3.210 -            // 
   3.211 -            // miSaveArmyAs
   3.212 -            // 
   3.213 -            this.miSaveArmyAs.Enabled = false;
   3.214 -            this.miSaveArmyAs.Name = "miSaveArmyAs";
   3.215 -            this.miSaveArmyAs.Size = new System.Drawing.Size(164, 22);
   3.216 -            this.miSaveArmyAs.Text = "save army &as...";
   3.217 -            this.miSaveArmyAs.Click += new System.EventHandler(this.miSaveArmyAs_Click);
   3.218 -            // 
   3.219 -            // miExportArmyAs
   3.220 -            // 
   3.221 -            this.miExportArmyAs.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.222 -            this.miExportArmyAsBasicHTML});
   3.223 -            this.miExportArmyAs.Enabled = false;
   3.224 -            this.miExportArmyAs.Name = "miExportArmyAs";
   3.225 -            this.miExportArmyAs.Size = new System.Drawing.Size(164, 22);
   3.226 -            this.miExportArmyAs.Text = "export army as...";
   3.227 -            // 
   3.228 -            // miExportArmyAsBasicHTML
   3.229 -            // 
   3.230 -            this.miExportArmyAsBasicHTML.Name = "miExportArmyAsBasicHTML";
   3.231 -            this.miExportArmyAsBasicHTML.Size = new System.Drawing.Size(130, 22);
   3.232 -            this.miExportArmyAsBasicHTML.Text = "&basic html";
   3.233 -            this.miExportArmyAsBasicHTML.Click += new System.EventHandler(this.miExportArmyAsBasicHTML_Click);
   3.234 -            // 
   3.235 -            // miCloseArmy
   3.236 -            // 
   3.237 -            this.miCloseArmy.Enabled = false;
   3.238 -            this.miCloseArmy.Name = "miCloseArmy";
   3.239 -            this.miCloseArmy.Size = new System.Drawing.Size(164, 22);
   3.240 -            this.miCloseArmy.Text = "&close army";
   3.241 -            this.miCloseArmy.Click += new System.EventHandler(this.miCloseArmy_Click);
   3.242 -            // 
   3.243 -            // toolStripSeparator1
   3.244 -            // 
   3.245 -            this.toolStripSeparator1.Name = "toolStripSeparator1";
   3.246 -            this.toolStripSeparator1.Size = new System.Drawing.Size(161, 6);
   3.247 -            // 
   3.248 -            // miReloadFiles
   3.249 -            // 
   3.250 -            this.miReloadFiles.Name = "miReloadFiles";
   3.251 -            this.miReloadFiles.Size = new System.Drawing.Size(164, 22);
   3.252 -            this.miReloadFiles.Text = "&reload files";
   3.253 -            this.miReloadFiles.Click += new System.EventHandler(this.miReloadFiles_Click);
   3.254 -            // 
   3.255 -            // toolStripSeparator2
   3.256 -            // 
   3.257 -            this.toolStripSeparator2.Name = "toolStripSeparator2";
   3.258 -            this.toolStripSeparator2.Size = new System.Drawing.Size(161, 6);
   3.259 -            // 
   3.260 -            // miExit
   3.261 -            // 
   3.262 -            this.miExit.Name = "miExit";
   3.263 -            this.miExit.Size = new System.Drawing.Size(164, 22);
   3.264 -            this.miExit.Text = "e&xit";
   3.265 -            this.miExit.Click += new System.EventHandler(this.miExit_Click);
   3.266 -            // 
   3.267 -            // menuEdit
   3.268 -            // 
   3.269 -            this.menuEdit.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.270 -            this.miUndo,
   3.271 -            this.miRedo,
   3.272 -            this.toolStripSeparator4,
   3.273 -            this.miPreferences});
   3.274 -            this.menuEdit.Name = "menuEdit";
   3.275 -            this.menuEdit.Size = new System.Drawing.Size(36, 20);
   3.276 -            this.menuEdit.Text = "&edit";
   3.277 -            // 
   3.278 -            // miUndo
   3.279 -            // 
   3.280 -            this.miUndo.Enabled = false;
   3.281 -            this.miUndo.Name = "miUndo";
   3.282 -            this.miUndo.Size = new System.Drawing.Size(142, 22);
   3.283 -            this.miUndo.Text = "&undo";
   3.284 -            this.miUndo.Click += new System.EventHandler(this.miUndo_Click);
   3.285 -            // 
   3.286 -            // miRedo
   3.287 -            // 
   3.288 -            this.miRedo.Enabled = false;
   3.289 -            this.miRedo.Name = "miRedo";
   3.290 -            this.miRedo.Size = new System.Drawing.Size(142, 22);
   3.291 -            this.miRedo.Text = "&redo";
   3.292 -            this.miRedo.Click += new System.EventHandler(this.miRedo_Click);
   3.293 -            // 
   3.294 -            // toolStripSeparator4
   3.295 -            // 
   3.296 -            this.toolStripSeparator4.Name = "toolStripSeparator4";
   3.297 -            this.toolStripSeparator4.Size = new System.Drawing.Size(139, 6);
   3.298 -            // 
   3.299 -            // miPreferences
   3.300 -            // 
   3.301 -            this.miPreferences.Name = "miPreferences";
   3.302 -            this.miPreferences.Size = new System.Drawing.Size(142, 22);
   3.303 -            this.miPreferences.Text = "&preferences";
   3.304 -            this.miPreferences.Click += new System.EventHandler(this.miPreferences_Click);
   3.305 -            // 
   3.306 -            // menuHelp
   3.307 -            // 
   3.308 -            this.menuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.309 -            this.miAbout});
   3.310 -            this.menuHelp.Name = "menuHelp";
   3.311 -            this.menuHelp.Size = new System.Drawing.Size(39, 20);
   3.312 -            this.menuHelp.Text = "&help";
   3.313 -            // 
   3.314 -            // miAbout
   3.315 -            // 
   3.316 -            this.miAbout.Name = "miAbout";
   3.317 -            this.miAbout.Size = new System.Drawing.Size(109, 22);
   3.318 -            this.miAbout.Text = "&about";
   3.319 -            this.miAbout.Click += new System.EventHandler(this.miAbout_Click);
   3.320 -            // 
   3.321 -            // mainToolStrip
   3.322 -            // 
   3.323 -            this.mainToolStrip.Dock = System.Windows.Forms.DockStyle.None;
   3.324 -            this.mainToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.325 -            this.bttnNewArmy,
   3.326 -            this.bttnOpenArmy,
   3.327 -            this.bttnSaveArmy,
   3.328 -            this.toolStripSeparator3,
   3.329 -            this.bttnUndo,
   3.330 -            this.bttnRedo});
   3.331 -            this.mainToolStrip.Location = new System.Drawing.Point(0, 24);
   3.332 -            this.mainToolStrip.Name = "mainToolStrip";
   3.333 -            this.mainToolStrip.Size = new System.Drawing.Size(182, 25);
   3.334 -            this.mainToolStrip.TabIndex = 8;
   3.335 -            // 
   3.336 -            // bttnNewArmy
   3.337 -            // 
   3.338 -            this.bttnNewArmy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
   3.339 -            this.bttnNewArmy.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.document_new;
   3.340 -            this.bttnNewArmy.ImageTransparentColor = System.Drawing.Color.Magenta;
   3.341 -            this.bttnNewArmy.Name = "bttnNewArmy";
   3.342 -            this.bttnNewArmy.Size = new System.Drawing.Size(23, 22);
   3.343 -            this.bttnNewArmy.Text = "new army";
   3.344 -            this.bttnNewArmy.Click += new System.EventHandler(this.miNewArmy_Click);
   3.345 -            // 
   3.346 -            // bttnOpenArmy
   3.347 -            // 
   3.348 -            this.bttnOpenArmy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
   3.349 -            this.bttnOpenArmy.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.document_open;
   3.350 -            this.bttnOpenArmy.ImageTransparentColor = System.Drawing.Color.Magenta;
   3.351 -            this.bttnOpenArmy.Name = "bttnOpenArmy";
   3.352 -            this.bttnOpenArmy.Size = new System.Drawing.Size(23, 22);
   3.353 -            this.bttnOpenArmy.Text = "open army";
   3.354 -            this.bttnOpenArmy.Click += new System.EventHandler(this.miOpenArmy_Click);
   3.355 -            // 
   3.356 -            // bttnSaveArmy
   3.357 -            // 
   3.358 -            this.bttnSaveArmy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
   3.359 -            this.bttnSaveArmy.Enabled = false;
   3.360 -            this.bttnSaveArmy.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.document_save;
   3.361 -            this.bttnSaveArmy.ImageTransparentColor = System.Drawing.Color.Magenta;
   3.362 -            this.bttnSaveArmy.Name = "bttnSaveArmy";
   3.363 -            this.bttnSaveArmy.Size = new System.Drawing.Size(23, 22);
   3.364 -            this.bttnSaveArmy.Text = "save army";
   3.365 -            this.bttnSaveArmy.Click += new System.EventHandler(this.miSaveArmy_Click);
   3.366 -            // 
   3.367 -            // toolStripSeparator3
   3.368 -            // 
   3.369 -            this.toolStripSeparator3.Name = "toolStripSeparator3";
   3.370 -            this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25);
   3.371 -            // 
   3.372 -            // bttnUndo
   3.373 -            // 
   3.374 -            this.bttnUndo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
   3.375 -            this.bttnUndo.Enabled = false;
   3.376 -            this.bttnUndo.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_undo;
   3.377 -            this.bttnUndo.ImageTransparentColor = System.Drawing.Color.Magenta;
   3.378 -            this.bttnUndo.Name = "bttnUndo";
   3.379 -            this.bttnUndo.Size = new System.Drawing.Size(32, 22);
   3.380 -            this.bttnUndo.Text = "undo";
   3.381 -            this.bttnUndo.ButtonClick += new System.EventHandler(this.miUndo_Click);
   3.382 -            // 
   3.383 -            // bttnRedo
   3.384 -            // 
   3.385 -            this.bttnRedo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
   3.386 -            this.bttnRedo.Enabled = false;
   3.387 -            this.bttnRedo.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_redo;
   3.388 -            this.bttnRedo.ImageTransparentColor = System.Drawing.Color.Magenta;
   3.389 -            this.bttnRedo.Name = "bttnRedo";
   3.390 -            this.bttnRedo.Size = new System.Drawing.Size(32, 22);
   3.391 -            this.bttnRedo.Text = "redo";
   3.392 -            this.bttnRedo.ButtonClick += new System.EventHandler(this.miRedo_Click);
   3.393 -            // 
   3.394 -            // catToolStrip
   3.395 -            // 
   3.396 -            this.catToolStrip.Dock = System.Windows.Forms.DockStyle.None;
   3.397 -            this.catToolStrip.Location = new System.Drawing.Point(161, 24);
   3.398 -            this.catToolStrip.Name = "catToolStrip";
   3.399 -            this.catToolStrip.Size = new System.Drawing.Size(111, 25);
   3.400 -            this.catToolStrip.TabIndex = 9;
   3.401 -            this.catToolStrip.Visible = false;
   3.402 -            // 
   3.403 -            // statusBar
   3.404 -            // 
   3.405 -            this.statusBar.Location = new System.Drawing.Point(0, 586);
   3.406 -            this.statusBar.Name = "statusBar";
   3.407 -            this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
   3.408 -            this.sbMainPanel,
   3.409 -            this.sbErrorPanel,
   3.410 -            this.sbPointsPanel});
   3.411 -            this.statusBar.ShowPanels = true;
   3.412 -            this.statusBar.Size = new System.Drawing.Size(790, 22);
   3.413 -            this.statusBar.TabIndex = 1;
   3.414 -            this.statusBar.PanelClick += new System.Windows.Forms.StatusBarPanelClickEventHandler(this.statusBar_PanelClick);
   3.415 -            this.statusBar.DrawItem += new System.Windows.Forms.StatusBarDrawItemEventHandler(this.statusBar_DrawItem);
   3.416 -            // 
   3.417 -            // sbMainPanel
   3.418 -            // 
   3.419 -            this.sbMainPanel.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
   3.420 -            this.sbMainPanel.Color = System.Drawing.SystemColors.WindowText;
   3.421 -            this.sbMainPanel.Name = "sbMainPanel";
   3.422 -            this.sbMainPanel.Style = System.Windows.Forms.StatusBarPanelStyle.OwnerDraw;
   3.423 -            this.sbMainPanel.Width = 473;
   3.424 -            // 
   3.425 -            // sbErrorPanel
   3.426 -            // 
   3.427 -            this.sbErrorPanel.Color = System.Drawing.SystemColors.WindowText;
   3.428 -            this.sbErrorPanel.Name = "sbErrorPanel";
   3.429 -            this.sbErrorPanel.Style = System.Windows.Forms.StatusBarPanelStyle.OwnerDraw;
   3.430 -            this.sbErrorPanel.Width = 150;
   3.431 -            // 
   3.432 -            // sbPointsPanel
   3.433 -            // 
   3.434 -            this.sbPointsPanel.Color = System.Drawing.SystemColors.WindowText;
   3.435 -            this.sbPointsPanel.Name = "sbPointsPanel";
   3.436 -            this.sbPointsPanel.Style = System.Windows.Forms.StatusBarPanelStyle.OwnerDraw;
   3.437 -            this.sbPointsPanel.ToolTipText = "current points total";
   3.438 -            this.sbPointsPanel.Width = 150;
   3.439 -            // 
   3.440 -            // toolStripPanel
   3.441 -            // 
   3.442 -            this.toolStripPanel.Dock = System.Windows.Forms.DockStyle.Top;
   3.443 -            this.toolStripPanel.Location = new System.Drawing.Point(0, 24);
   3.444 -            this.toolStripPanel.Name = "toolStripPanel";
   3.445 -            this.toolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
   3.446 -            this.toolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
   3.447 -            this.toolStripPanel.Size = new System.Drawing.Size(790, 0);
   3.448 -            // 
   3.449 -            // FrmMain
   3.450 -            // 
   3.451 -            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
   3.452 -            this.ClientSize = new System.Drawing.Size(790, 608);
   3.453 -            this.Controls.Add(this.mainToolStrip);
   3.454 -            this.Controls.Add(this.toolStripPanel);
   3.455 -            this.Controls.Add(this.statusBar);
   3.456 -            this.Controls.Add(this.catToolStrip);
   3.457 -            this.Controls.Add(this.menuStrip);
   3.458 -            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
   3.459 -            this.IsMdiContainer = true;
   3.460 -            this.MainMenuStrip = this.menuStrip;
   3.461 -            this.Menu = this.mainMenu;
   3.462 -            this.Name = "FrmMain";
   3.463 -            this.Text = "WarFoundry";
   3.464 -            this.Load += new System.EventHandler(this.FrmMain_Load);
   3.465 -            this.menuStrip.ResumeLayout(false);
   3.466 -            this.menuStrip.PerformLayout();
   3.467 -            this.mainToolStrip.ResumeLayout(false);
   3.468 -            this.mainToolStrip.PerformLayout();
   3.469 -            ((System.ComponentModel.ISupportInitialize)(this.sbMainPanel)).EndInit();
   3.470 -            ((System.ComponentModel.ISupportInitialize)(this.sbErrorPanel)).EndInit();
   3.471 -            ((System.ComponentModel.ISupportInitialize)(this.sbPointsPanel)).EndInit();
   3.472 -            this.ResumeLayout(false);
   3.473 -            this.PerformLayout();
   3.474 +			this.components = new System.ComponentModel.Container();
   3.475 +			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
   3.476 +			this.undoMenu = new System.Windows.Forms.ContextMenu();
   3.477 +			this.redoMenu = new System.Windows.Forms.ContextMenu();
   3.478 +			this.mainMenu = new System.Windows.Forms.MainMenu(this.components);
   3.479 +			this.openArmyDialog = new System.Windows.Forms.OpenFileDialog();
   3.480 +			this.saveArmyDialog = new System.Windows.Forms.SaveFileDialog();
   3.481 +			this.menuStrip = new System.Windows.Forms.MenuStrip();
   3.482 +			this.menuFile = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.483 +			this.miNewArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.484 +			this.miOpenArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.485 +			this.miSaveArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.486 +			this.miSaveArmyAs = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.487 +			this.miExportArmyAs = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.488 +			this.miExportArmyAsBasicHTML = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.489 +			this.miCloseArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.490 +			this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
   3.491 +			this.miReloadFiles = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.492 +			this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
   3.493 +			this.miExit = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.494 +			this.menuEdit = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.495 +			this.miUndo = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.496 +			this.miRedo = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.497 +			this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
   3.498 +			this.miPreferences = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.499 +			this.menuHelp = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.500 +			this.miAbout = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
   3.501 +			this.mainToolStrip = new System.Windows.Forms.ToolStrip();
   3.502 +			this.bttnNewArmy = new IBBoard.Windows.Forms.IBBToolStripButton();
   3.503 +			this.bttnOpenArmy = new IBBoard.Windows.Forms.IBBToolStripButton();
   3.504 +			this.bttnSaveArmy = new IBBoard.Windows.Forms.IBBToolStripButton();
   3.505 +			this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
   3.506 +			this.bttnUndo = new IBBoard.Windows.Forms.IBBToolStripSplitButton();
   3.507 +			this.bttnRedo = new IBBoard.Windows.Forms.IBBToolStripSplitButton();
   3.508 +			this.catToolStrip = new System.Windows.Forms.ToolStrip();
   3.509 +			this.statusBar = new IBBoard.Windows.Forms.ColorableStatusBar();
   3.510 +			this.sbMainPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel();
   3.511 +			this.sbErrorPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel();
   3.512 +			this.sbPointsPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel();
   3.513 +			this.toolStripPanel = new System.Windows.Forms.ToolStripPanel();
   3.514 +			this.menuStrip.SuspendLayout();
   3.515 +			this.mainToolStrip.SuspendLayout();
   3.516 +			((System.ComponentModel.ISupportInitialize)(this.sbMainPanel)).BeginInit();
   3.517 +			((System.ComponentModel.ISupportInitialize)(this.sbErrorPanel)).BeginInit();
   3.518 +			((System.ComponentModel.ISupportInitialize)(this.sbPointsPanel)).BeginInit();
   3.519 +			this.SuspendLayout();
   3.520 +			// 
   3.521 +			// saveArmyDialog
   3.522 +			// 
   3.523 +			this.saveArmyDialog.Title = "Translatable:saveArmyDialog";
   3.524 +			// 
   3.525 +			// menuStrip
   3.526 +			// 
   3.527 +			this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.528 +			this.menuFile,
   3.529 +			this.menuEdit,
   3.530 +			this.menuHelp});
   3.531 +			this.menuStrip.Location = new System.Drawing.Point(0, 0);
   3.532 +			this.menuStrip.Name = "menuStrip";
   3.533 +			this.menuStrip.Size = new System.Drawing.Size(790, 24);
   3.534 +			this.menuStrip.TabIndex = 6;
   3.535 +			this.menuStrip.Text = "menuStrip1";
   3.536 +			// 
   3.537 +			// menuFile
   3.538 +			// 
   3.539 +			this.menuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.540 +			this.miNewArmy,
   3.541 +			this.miOpenArmy,
   3.542 +			this.miSaveArmy,
   3.543 +			this.miSaveArmyAs,
   3.544 +			this.miExportArmyAs,
   3.545 +			this.miCloseArmy,
   3.546 +			this.toolStripSeparator1,
   3.547 +			this.miReloadFiles,
   3.548 +			this.toolStripSeparator2,
   3.549 +			this.miExit});
   3.550 +			this.menuFile.Name = "menuFile";
   3.551 +			this.menuFile.Size = new System.Drawing.Size(33, 20);
   3.552 +			this.menuFile.Text = "&file";
   3.553 +			// 
   3.554 +			// miNewArmy
   3.555 +			// 
   3.556 +			this.miNewArmy.Name = "miNewArmy";
   3.557 +			this.miNewArmy.Size = new System.Drawing.Size(164, 22);
   3.558 +			this.miNewArmy.Text = "&new army";
   3.559 +			this.miNewArmy.Click += new System.EventHandler(this.miNewArmy_Click);
   3.560 +			// 
   3.561 +			// miOpenArmy
   3.562 +			// 
   3.563 +			this.miOpenArmy.Name = "miOpenArmy";
   3.564 +			this.miOpenArmy.Size = new System.Drawing.Size(164, 22);
   3.565 +			this.miOpenArmy.Text = "&open army";
   3.566 +			this.miOpenArmy.Click += new System.EventHandler(this.miOpenArmy_Click);
   3.567 +			// 
   3.568 +			// miSaveArmy
   3.569 +			// 
   3.570 +			this.miSaveArmy.Enabled = false;
   3.571 +			this.miSaveArmy.Name = "miSaveArmy";
   3.572 +			this.miSaveArmy.Size = new System.Drawing.Size(164, 22);
   3.573 +			this.miSaveArmy.Text = "&save army";
   3.574 +			this.miSaveArmy.Click += new System.EventHandler(this.miSaveArmy_Click);
   3.575 +			// 
   3.576 +			// miSaveArmyAs
   3.577 +			// 
   3.578 +			this.miSaveArmyAs.Enabled = false;
   3.579 +			this.miSaveArmyAs.Name = "miSaveArmyAs";
   3.580 +			this.miSaveArmyAs.Size = new System.Drawing.Size(164, 22);
   3.581 +			this.miSaveArmyAs.Text = "save army &as...";
   3.582 +			this.miSaveArmyAs.Click += new System.EventHandler(this.miSaveArmyAs_Click);
   3.583 +			// 
   3.584 +			// miExportArmyAs
   3.585 +			// 
   3.586 +			this.miExportArmyAs.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.587 +			this.miExportArmyAsBasicHTML});
   3.588 +			this.miExportArmyAs.Enabled = false;
   3.589 +			this.miExportArmyAs.Name = "miExportArmyAs";
   3.590 +			this.miExportArmyAs.Size = new System.Drawing.Size(164, 22);
   3.591 +			this.miExportArmyAs.Text = "export army as...";
   3.592 +			// 
   3.593 +			// miExportArmyAsBasicHTML
   3.594 +			// 
   3.595 +			this.miExportArmyAsBasicHTML.Name = "miExportArmyAsBasicHTML";
   3.596 +			this.miExportArmyAsBasicHTML.Size = new System.Drawing.Size(130, 22);
   3.597 +			this.miExportArmyAsBasicHTML.Text = "&basic html";
   3.598 +			this.miExportArmyAsBasicHTML.Click += new System.EventHandler(this.miExportArmyAsBasicHTML_Click);
   3.599 +			// 
   3.600 +			// miCloseArmy
   3.601 +			// 
   3.602 +			this.miCloseArmy.Enabled = false;
   3.603 +			this.miCloseArmy.Name = "miCloseArmy";
   3.604 +			this.miCloseArmy.Size = new System.Drawing.Size(164, 22);
   3.605 +			this.miCloseArmy.Text = "&close army";
   3.606 +			this.miCloseArmy.Click += new System.EventHandler(this.miCloseArmy_Click);
   3.607 +			// 
   3.608 +			// toolStripSeparator1
   3.609 +			// 
   3.610 +			this.toolStripSeparator1.Name = "toolStripSeparator1";
   3.611 +			this.toolStripSeparator1.Size = new System.Drawing.Size(161, 6);
   3.612 +			// 
   3.613 +			// miReloadFiles
   3.614 +			// 
   3.615 +			this.miReloadFiles.Name = "miReloadFiles";
   3.616 +			this.miReloadFiles.Size = new System.Drawing.Size(164, 22);
   3.617 +			this.miReloadFiles.Text = "&reload files";
   3.618 +			this.miReloadFiles.Click += new System.EventHandler(this.miReloadFiles_Click);
   3.619 +			// 
   3.620 +			// toolStripSeparator2
   3.621 +			// 
   3.622 +			this.toolStripSeparator2.Name = "toolStripSeparator2";
   3.623 +			this.toolStripSeparator2.Size = new System.Drawing.Size(161, 6);
   3.624 +			// 
   3.625 +			// miExit
   3.626 +			// 
   3.627 +			this.miExit.Name = "miExit";
   3.628 +			this.miExit.Size = new System.Drawing.Size(164, 22);
   3.629 +			this.miExit.Text = "e&xit";
   3.630 +			this.miExit.Click += new System.EventHandler(this.miExit_Click);
   3.631 +			// 
   3.632 +			// menuEdit
   3.633 +			// 
   3.634 +			this.menuEdit.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.635 +			this.miUndo,
   3.636 +			this.miRedo,
   3.637 +			this.toolStripSeparator4,
   3.638 +			this.miPreferences});
   3.639 +			this.menuEdit.Name = "menuEdit";
   3.640 +			this.menuEdit.Size = new System.Drawing.Size(36, 20);
   3.641 +			this.menuEdit.Text = "&edit";
   3.642 +			// 
   3.643 +			// miUndo
   3.644 +			// 
   3.645 +			this.miUndo.Enabled = false;
   3.646 +			this.miUndo.Name = "miUndo";
   3.647 +			this.miUndo.Size = new System.Drawing.Size(142, 22);
   3.648 +			this.miUndo.Text = "&undo";
   3.649 +			this.miUndo.Click += new System.EventHandler(this.miUndo_Click);
   3.650 +			// 
   3.651 +			// miRedo
   3.652 +			// 
   3.653 +			this.miRedo.Enabled = false;
   3.654 +			this.miRedo.Name = "miRedo";
   3.655 +			this.miRedo.Size = new System.Drawing.Size(142, 22);
   3.656 +			this.miRedo.Text = "&redo";
   3.657 +			this.miRedo.Click += new System.EventHandler(this.miRedo_Click);
   3.658 +			// 
   3.659 +			// toolStripSeparator4
   3.660 +			// 
   3.661 +			this.toolStripSeparator4.Name = "toolStripSeparator4";
   3.662 +			this.toolStripSeparator4.Size = new System.Drawing.Size(139, 6);
   3.663 +			// 
   3.664 +			// miPreferences
   3.665 +			// 
   3.666 +			this.miPreferences.Name = "miPreferences";
   3.667 +			this.miPreferences.Size = new System.Drawing.Size(142, 22);
   3.668 +			this.miPreferences.Text = "&preferences";
   3.669 +			this.miPreferences.Click += new System.EventHandler(this.miPreferences_Click);
   3.670 +			// 
   3.671 +			// menuHelp
   3.672 +			// 
   3.673 +			this.menuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.674 +			this.miAbout});
   3.675 +			this.menuHelp.Name = "menuHelp";
   3.676 +			this.menuHelp.Size = new System.Drawing.Size(39, 20);
   3.677 +			this.menuHelp.Text = "&help";
   3.678 +			// 
   3.679 +			// miAbout
   3.680 +			// 
   3.681 +			this.miAbout.Name = "miAbout";
   3.682 +			this.miAbout.Size = new System.Drawing.Size(109, 22);
   3.683 +			this.miAbout.Text = "&about";
   3.684 +			this.miAbout.Click += new System.EventHandler(this.miAbout_Click);
   3.685 +			// 
   3.686 +			// mainToolStrip
   3.687 +			// 
   3.688 +			this.mainToolStrip.Dock = System.Windows.Forms.DockStyle.None;
   3.689 +			this.mainToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
   3.690 +			this.bttnNewArmy,
   3.691 +			this.bttnOpenArmy,
   3.692 +			this.bttnSaveArmy,
   3.693 +			this.toolStripSeparator3,
   3.694 +			this.bttnUndo,
   3.695 +			this.bttnRedo});
   3.696 +			this.mainToolStrip.Location = new System.Drawing.Point(0, 24);
   3.697 +			this.mainToolStrip.Name = "mainToolStrip";
   3.698 +			this.mainToolStrip.Size = new System.Drawing.Size(182, 25);
   3.699 +			this.mainToolStrip.TabIndex = 8;
   3.700 +			// 
   3.701 +			// bttnNewArmy
   3.702 +			// 
   3.703 +			this.bttnNewArmy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
   3.704 +			this.bttnNewArmy.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.document_new;
   3.705 +			this.bttnNewArmy.ImageTransparentColor = System.Drawing.Color.Magenta;
   3.706 +			this.bttnNewArmy.Name = "bttnNewArmy";
   3.707 +			this.bttnNewArmy.Size = new System.Drawing.Size(23, 22);
   3.708 +			this.bttnNewArmy.Text = "new army";
   3.709 +			this.bttnNewArmy.Click += new System.EventHandler(this.miNewArmy_Click);
   3.710 +			// 
   3.711 +			// bttnOpenArmy
   3.712 +			// 
   3.713 +			this.bttnOpenArmy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
   3.714 +			this.bttnOpenArmy.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.document_open;
   3.715 +			this.bttnOpenArmy.ImageTransparentColor = System.Drawing.Color.Magenta;
   3.716 +			this.bttnOpenArmy.Name = "bttnOpenArmy";
   3.717 +			this.bttnOpenArmy.Size = new System.Drawing.Size(23, 22);
   3.718 +			this.bttnOpenArmy.Text = "open army";
   3.719 +			this.bttnOpenArmy.Click += new System.EventHandler(this.miOpenArmy_Click);
   3.720 +			// 
   3.721 +			// bttnSaveArmy
   3.722 +			// 
   3.723 +			this.bttnSaveArmy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
   3.724 +			this.bttnSaveArmy.Enabled = false;
   3.725 +			this.bttnSaveArmy.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.document_save;
   3.726 +			this.bttnSaveArmy.ImageTransparentColor = System.Drawing.Color.Magenta;
   3.727 +			this.bttnSaveArmy.Name = "bttnSaveArmy";
   3.728 +			this.bttnSaveArmy.Size = new System.Drawing.Size(23, 22);
   3.729 +			this.bttnSaveArmy.Text = "save army";
   3.730 +			this.bttnSaveArmy.Click += new System.EventHandler(this.miSaveArmy_Click);
   3.731 +			// 
   3.732 +			// toolStripSeparator3
   3.733 +			// 
   3.734 +			this.toolStripSeparator3.Name = "toolStripSeparator3";
   3.735 +			this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25);
   3.736 +			// 
   3.737 +			// bttnUndo
   3.738 +			// 
   3.739 +			this.bttnUndo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
   3.740 +			this.bttnUndo.Enabled = false;
   3.741 +			this.bttnUndo.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_undo;
   3.742 +			this.bttnUndo.ImageTransparentColor = System.Drawing.Color.Magenta;
   3.743 +			this.bttnUndo.Name = "bttnUndo";
   3.744 +			this.bttnUndo.Size = new System.Drawing.Size(32, 22);
   3.745 +			this.bttnUndo.Text = "undo";
   3.746 +			this.bttnUndo.ButtonClick += new System.EventHandler(this.miUndo_Click);
   3.747 +			// 
   3.748 +			// bttnRedo
   3.749 +			// 
   3.750 +			this.bttnRedo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
   3.751 +			this.bttnRedo.Enabled = false;
   3.752 +			this.bttnRedo.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_redo;
   3.753 +			this.bttnRedo.ImageTransparentColor = System.Drawing.Color.Magenta;
   3.754 +			this.bttnRedo.Name = "bttnRedo";
   3.755 +			this.bttnRedo.Size = new System.Drawing.Size(32, 22);
   3.756 +			this.bttnRedo.Text = "redo";
   3.757 +			this.bttnRedo.ButtonClick += new System.EventHandler(this.miRedo_Click);
   3.758 +			// 
   3.759 +			// catToolStrip
   3.760 +			// 
   3.761 +			this.catToolStrip.Dock = System.Windows.Forms.DockStyle.None;
   3.762 +			this.catToolStrip.Location = new System.Drawing.Point(161, 24);
   3.763 +			this.catToolStrip.Name = "catToolStrip";
   3.764 +			this.catToolStrip.Size = new System.Drawing.Size(111, 25);
   3.765 +			this.catToolStrip.TabIndex = 9;
   3.766 +			this.catToolStrip.Visible = false;
   3.767 +			// 
   3.768 +			// statusBar
   3.769 +			// 
   3.770 +			this.statusBar.Location = new System.Drawing.Point(0, 586);
   3.771 +			this.statusBar.Name = "statusBar";
   3.772 +			this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
   3.773 +			this.sbMainPanel,
   3.774 +			this.sbErrorPanel,
   3.775 +			this.sbPointsPanel});
   3.776 +			this.statusBar.ShowPanels = true;
   3.777 +			this.statusBar.Size = new System.Drawing.Size(790, 22);
   3.778 +			this.statusBar.TabIndex = 1;
   3.779 +			this.statusBar.PanelClick += new System.Windows.Forms.StatusBarPanelClickEventHandler(this.statusBar_PanelClick);
   3.780 +			this.statusBar.DrawItem += new System.Windows.Forms.StatusBarDrawItemEventHandler(this.statusBar_DrawItem);
   3.781 +			// 
   3.782 +			// sbMainPanel
   3.783 +			// 
   3.784 +			this.sbMainPanel.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
   3.785 +			this.sbMainPanel.Color = System.Drawing.SystemColors.WindowText;
   3.786 +			this.sbMainPanel.Name = "sbMainPanel";
   3.787 +			this.sbMainPanel.Style = System.Windows.Forms.StatusBarPanelStyle.OwnerDraw;
   3.788 +			this.sbMainPanel.Width = 473;
   3.789 +			// 
   3.790 +			// sbErrorPanel
   3.791 +			// 
   3.792 +			this.sbErrorPanel.Color = System.Drawing.SystemColors.WindowText;
   3.793 +			this.sbErrorPanel.Name = "sbErrorPanel";
   3.794 +			this.sbErrorPanel.Style = System.Windows.Forms.StatusBarPanelStyle.OwnerDraw;
   3.795 +			this.sbErrorPanel.Width = 150;
   3.796 +			// 
   3.797 +			// sbPointsPanel
   3.798 +			// 
   3.799 +			this.sbPointsPanel.Color = System.Drawing.SystemColors.WindowText;
   3.800 +			this.sbPointsPanel.Name = "sbPointsPanel";
   3.801 +			this.sbPointsPanel.Style = System.Windows.Forms.StatusBarPanelStyle.OwnerDraw;
   3.802 +			this.sbPointsPanel.ToolTipText = "current points total";
   3.803 +			this.sbPointsPanel.Width = 150;
   3.804 +			// 
   3.805 +			// toolStripPanel
   3.806 +			// 
   3.807 +			this.toolStripPanel.Dock = System.Windows.Forms.DockStyle.Top;
   3.808 +			this.toolStripPanel.Location = new System.Drawing.Point(0, 24);
   3.809 +			this.toolStripPanel.Name = "toolStripPanel";
   3.810 +			this.toolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
   3.811 +			this.toolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
   3.812 +			this.toolStripPanel.Size = new System.Drawing.Size(790, 0);
   3.813 +			// 
   3.814 +			// FrmMain
   3.815 +			// 
   3.816 +			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
   3.817 +			this.ClientSize = new System.Drawing.Size(790, 608);
   3.818 +			this.Controls.Add(this.mainToolStrip);
   3.819 +			this.Controls.Add(this.toolStripPanel);
   3.820 +			this.Controls.Add(this.statusBar);
   3.821 +			this.Controls.Add(this.catToolStrip);
   3.822 +			this.Controls.Add(this.menuStrip);
   3.823 +			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
   3.824 +			this.IsMdiContainer = true;
   3.825 +			this.MainMenuStrip = this.menuStrip;
   3.826 +			this.Menu = this.mainMenu;
   3.827 +			this.Name = "FrmMain";
   3.828 +			this.Text = "WarFoundry";
   3.829 +			this.Load += new System.EventHandler(this.FrmMain_Load);
   3.830 +			this.menuStrip.ResumeLayout(false);
   3.831 +			this.menuStrip.PerformLayout();
   3.832 +			this.mainToolStrip.ResumeLayout(false);
   3.833 +			this.mainToolStrip.PerformLayout();
   3.834 +			((System.ComponentModel.ISupportInitialize)(this.sbMainPanel)).EndInit();
   3.835 +			((System.ComponentModel.ISupportInitialize)(this.sbErrorPanel)).EndInit();
   3.836 +			((System.ComponentModel.ISupportInitialize)(this.sbPointsPanel)).EndInit();
   3.837 +			this.ResumeLayout(false);
   3.838 +			this.PerformLayout();
   3.839  
   3.840  		}
   3.841  		#endregion
   3.842 @@ -835,7 +835,7 @@
   3.843  
   3.844  		private bool SaveCurrentArmyToFile(string filePath)
   3.845  		{
   3.846 -            if (WarFoundrySaver.GetSaver().Save(filePath, CurrentArmy))
   3.847 +			if (WarFoundrySaver.GetSaver().Save(filePath, CurrentArmy))
   3.848  			{
   3.849  				loadedFilePath = filePath;
   3.850  				miSaveArmy.Enabled = false;
   3.851 @@ -894,16 +894,16 @@
   3.852  		{
   3.853  			SetAppTitle();
   3.854  
   3.855 -            if (newSystem == null)
   3.856 -            {
   3.857 -                Preferences["currSystem"] = "";
   3.858 -            }
   3.859 -            else
   3.860 -            {
   3.861 -                Preferences["currSystem"] = newSystem.ID;
   3.862 -            }
   3.863 +			if (newSystem == null)
   3.864 +			{
   3.865 +				Preferences["currSystem"] = "";
   3.866 +			}
   3.867 +			else
   3.868 +			{
   3.869 +				Preferences["currSystem"] = newSystem.ID;
   3.870 +			}
   3.871  
   3.872 -            Preferences.Save();
   3.873 +			Preferences.Save();
   3.874  			RemoveCategoryButtons();
   3.875  		}
   3.876  
   3.877 @@ -913,7 +913,7 @@
   3.878  			loadedFilePath = null;
   3.879  			miSaveArmy.Enabled = false;
   3.880  			bttnSaveArmy.Enabled = false;
   3.881 -            //TODO: Subscribe to an "army changed" event here
   3.882 +			//TODO: Subscribe to an "army changed" event here
   3.883  			SetPointsPanelText();
   3.884  			SetAppTitle();
   3.885  		}
   3.886 @@ -976,7 +976,7 @@
   3.887  			miExportArmyAs.Enabled = false;
   3.888  			DisableCategoryButtons();
   3.889  			GetArmyTree().Hide();
   3.890 -            GetNewUnitTree().Hide();
   3.891 +			GetNewUnitTree().Hide();
   3.892  		}
   3.893  
   3.894  		private void SetNonNullArmyState(Army newArmy)
   3.895 @@ -987,7 +987,7 @@
   3.896  			miCloseArmy.Enabled = true;
   3.897  			miExportArmyAs.Enabled = true;
   3.898  			GetArmyTree().Show();
   3.899 -            GetNewUnitTree().Show();
   3.900 +			GetNewUnitTree().Show();
   3.901  		}
   3.902  
   3.903  		private void SetCategoryButtons(Category[] cats)
   3.904 @@ -1202,18 +1202,18 @@
   3.905  
   3.906  			if (dr == DialogResult.OK)
   3.907  			{
   3.908 -                UnitType unitType = newUnit.SelectedUnit;
   3.909 -                CreateUnitInCategory(unitType, cat);
   3.910 +				UnitType unitType = newUnit.SelectedUnit;
   3.911 +				CreateUnitInCategory(unitType, cat);
   3.912  			}
   3.913  		}
   3.914  
   3.915 -        internal void CreateUnitInCategory(UnitType unitType, Category cat)
   3.916 -        {
   3.917 -            ArmyCategory armyCat = CurrentArmy.GetCategory(cat);
   3.918 -            CreateAndAddUnitCommand cmd = new CreateAndAddUnitCommand(unitType, armyCat);
   3.919 -            commandStack.Execute(cmd);
   3.920 -            OpenUnitDialog(cmd.Unit);
   3.921 -        }
   3.922 +		internal void CreateUnitInCategory(UnitType unitType, Category cat)
   3.923 +		{
   3.924 +			ArmyCategory armyCat = CurrentArmy.GetCategory(cat);
   3.925 +			CreateAndAddUnitCommand cmd = new CreateAndAddUnitCommand(unitType, armyCat);
   3.926 +			commandStack.Execute(cmd);
   3.927 +			OpenUnitDialog(cmd.Unit);
   3.928 +		}
   3.929  
   3.930  		internal void OpenUnitDialog(Unit unit)
   3.931  		{
   3.932 @@ -1244,27 +1244,27 @@
   3.933  
   3.934  		private void FrmMain_UnitAddedMethod(object unitObj)
   3.935  		{
   3.936 -            ValidateArmy();
   3.937 +			ValidateArmy();
   3.938  		}
   3.939  
   3.940 -        private void ValidateArmy()
   3.941 -        {
   3.942 -            ICollection<string> failureMessages;
   3.943 -            if (Validates.AsOkay(RequirementHandler.ValidateArmy(CurrentArmy, out failureMessages)))
   3.944 -            {
   3.945 -                sbErrorPanel.Text = "";
   3.946 -                sbErrorPanel.Tag = "";
   3.947 -            }
   3.948 -            else
   3.949 -            {
   3.950 -                sbErrorPanel.Text = failureMessages.Count + " validation errors";
   3.951 -                sbErrorPanel.Tag = String.Join("\n", new List<string>(failureMessages).ToArray());
   3.952 -            }
   3.953 -        }
   3.954 +		private void ValidateArmy()
   3.955 +		{
   3.956 +			ICollection<string> failureMessages;
   3.957 +			if (Validates.AsOkay(RequirementHandler.ValidateArmy(CurrentArmy, out failureMessages)))
   3.958 +			{
   3.959 +				sbErrorPanel.Text = "";
   3.960 +				sbErrorPanel.Tag = "";
   3.961 +			}
   3.962 +			else
   3.963 +			{
   3.964 +				sbErrorPanel.Text = failureMessages.Count + " validation errors";
   3.965 +				sbErrorPanel.Tag = String.Join("\n", new List<string>(failureMessages).ToArray());
   3.966 +			}
   3.967 +		}
   3.968  
   3.969  		private void FrmMain_UnitRemovedMethod(object unitObj)
   3.970  		{
   3.971 -            ValidateArmy();
   3.972 +			ValidateArmy();
   3.973  
   3.974  			if (unitObj is Unit)
   3.975  			{
   3.976 @@ -1313,7 +1313,7 @@
   3.977  			}
   3.978  		}
   3.979  
   3.980 -        private void SetPointsPanelText()
   3.981 +		private void SetPointsPanelText()
   3.982  		{	
   3.983  			if (CurrentArmy==null)
   3.984  			{
   3.985 @@ -1322,8 +1322,8 @@
   3.986  			}
   3.987  			else 
   3.988  			{
   3.989 -                string pointsPanelText = String.Format(Translation.GetTranslation("statusPanelPoints"), CurrentArmy.Points, CurrentGameSystem.GetPointsName(CurrentArmy.Points), CurrentArmy.MaxPoints, CurrentGameSystem.GetPointsName(CurrentArmy.MaxPoints));
   3.990 -                sbPointsPanel.Text = pointsPanelText;
   3.991 +				string pointsPanelText = String.Format(Translation.GetTranslation("statusPanelPoints"), CurrentArmy.Points, CurrentGameSystem.GetPointsName(CurrentArmy.Points), CurrentArmy.MaxPoints, CurrentGameSystem.GetPointsName(CurrentArmy.MaxPoints));
   3.992 +				sbPointsPanel.Text = pointsPanelText;
   3.993  
   3.994  				if (CurrentArmy.Points>CurrentArmy.MaxPoints)
   3.995  				{
   3.996 @@ -1336,10 +1336,10 @@
   3.997  			}
   3.998  		}
   3.999  
  3.1000 -        private void SetPointsPanelToolTipText()
  3.1001 -        {
  3.1002 -            sbPointsPanel.ToolTipText = Translation.GetTranslation("statusPanelPointsToolTip", "total points value");
  3.1003 -        }
  3.1004 +		private void SetPointsPanelToolTipText()
  3.1005 +		{
  3.1006 +			sbPointsPanel.ToolTipText = Translation.GetTranslation("statusPanelPointsToolTip", "total points value");
  3.1007 +		}
  3.1008  
  3.1009  		private void redoMenu_Click(object sender, EventArgs e)
  3.1010  		{
     4.1 --- a/FrmNewUnitFromTree.Designer.cs	Sat Aug 20 17:05:45 2011 +0100
     4.2 +++ b/FrmNewUnitFromTree.Designer.cs	Sat Aug 20 20:58:16 2011 +0100
     4.3 @@ -31,7 +31,7 @@
     4.4              this.components = new System.ComponentModel.Container();
     4.5              this.unitTypeTree = new System.Windows.Forms.TreeView();
     4.6              this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
     4.7 -            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
     4.8 +            this.addUnitMenuItem = new IBBoard.Windows.Forms.IBBToolStripMenuItem();
     4.9              this.contextMenu.SuspendLayout();
    4.10              this.SuspendLayout();
    4.11              // 
    4.12 @@ -46,21 +46,23 @@
    4.13              this.unitTypeTree.Size = new System.Drawing.Size(199, 287);
    4.14              this.unitTypeTree.TabIndex = 0;
    4.15              this.unitTypeTree.DoubleClick += new System.EventHandler(this.unitTypeTree_DoubleClick);
    4.16 +            this.unitTypeTree.MouseDown += new System.Windows.Forms.MouseEventHandler(this.unitTypeTree_MouseDown);
    4.17              // 
    4.18              // contextMenu
    4.19              // 
    4.20              this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
    4.21 -            this.toolStripMenuItem1});
    4.22 +            this.addUnitMenuItem});
    4.23              this.contextMenu.Name = "contextMenu";
    4.24 -            this.contextMenu.Size = new System.Drawing.Size(154, 26);
    4.25 +            this.contextMenu.Size = new System.Drawing.Size(163, 48);
    4.26 +            this.contextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenu_Opening);
    4.27              // 
    4.28 -            // toolStripMenuItem1
    4.29 +            // addUnitMenuItem
    4.30              // 
    4.31 -            this.toolStripMenuItem1.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.list_add;
    4.32 -            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
    4.33 -            this.toolStripMenuItem1.Size = new System.Drawing.Size(153, 22);
    4.34 -            this.toolStripMenuItem1.Text = "Add Unit Type";
    4.35 -            this.toolStripMenuItem1.Click += new System.EventHandler(this.AddUnitClicked);
    4.36 +            this.addUnitMenuItem.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.list_add;
    4.37 +            this.addUnitMenuItem.Name = "addUnitMenuItem";
    4.38 +            this.addUnitMenuItem.Size = new System.Drawing.Size(162, 22);
    4.39 +            this.addUnitMenuItem.Text = "add unit of type";
    4.40 +            this.addUnitMenuItem.Click += new System.EventHandler(this.AddUnitClicked);
    4.41              // 
    4.42              // FrmNewUnitFromTree
    4.43              // 
    4.44 @@ -71,7 +73,7 @@
    4.45              this.Controls.Add(this.unitTypeTree);
    4.46              this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
    4.47              this.Name = "FrmNewUnitFromTree";
    4.48 -            this.Text = "Available Unit Types";
    4.49 +            this.Text = "available unit types";
    4.50              this.contextMenu.ResumeLayout(false);
    4.51              this.ResumeLayout(false);
    4.52  
    4.53 @@ -81,6 +83,6 @@
    4.54  
    4.55          private System.Windows.Forms.TreeView unitTypeTree;
    4.56          private System.Windows.Forms.ContextMenuStrip contextMenu;
    4.57 -        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
    4.58 +        private Windows.Forms.IBBToolStripMenuItem addUnitMenuItem;
    4.59      }
    4.60  }
    4.61 \ No newline at end of file
     5.1 --- a/FrmNewUnitFromTree.cs	Sat Aug 20 17:05:45 2011 +0100
     5.2 +++ b/FrmNewUnitFromTree.cs	Sat Aug 20 20:58:16 2011 +0100
     5.3 @@ -1,99 +1,125 @@
     5.4  ´╗┐using System;
     5.5 -using System.Collections.Generic;
     5.6  using System.ComponentModel;
     5.7 -using System.Data;
     5.8 -using System.Drawing;
     5.9 -using System.Linq;
    5.10 -using System.Text;
    5.11  using System.Windows.Forms;
    5.12 +using IBBoard.Lang;
    5.13 +using IBBoard.WarFoundry.API;
    5.14  using IBBoard.WarFoundry.API.Objects;
    5.15 -using IBBoard.WarFoundry.API;
    5.16 +using IBBoard.Windows.Forms;
    5.17 +using IBBoard.Windows.Forms.I18N;
    5.18  
    5.19  namespace IBBoard.WarFoundry.GUI.WinForms
    5.20  {
    5.21 -    public partial class FrmNewUnitFromTree : Form
    5.22 -    {
    5.23 -        public FrmNewUnitFromTree()
    5.24 -        {
    5.25 -            InitializeComponent();
    5.26 -            WarFoundryCore.ArmyChanged += new ArmyChangedDelegate(ArmyChanged);
    5.27 -        }
    5.28 +	public partial class FrmNewUnitFromTree : IBBForm
    5.29 +	{
    5.30 +		public FrmNewUnitFromTree()
    5.31 +		{
    5.32 +			InitializeComponent();
    5.33 +			WarFoundryCore.ArmyChanged += new ArmyChangedDelegate(ArmyChanged);
    5.34 +			TranslateForm();
    5.35 +			Translation.TranslationChanged += new MethodInvoker(TranslateForm);
    5.36 +		}
    5.37  
    5.38 -        private void ArmyChanged(Army oldArmy, Army newArmy)
    5.39 -        {
    5.40 -            unitTypeTree.Nodes.Clear();
    5.41 +		private void TranslateForm()
    5.42 +		{
    5.43 +			ControlTranslator.TranslateControl(this);
    5.44 +			ControlTranslator.TranslateComponent(addUnitMenuItem);
    5.45 +		}
    5.46  
    5.47 -            if (newArmy != null)
    5.48 -            {
    5.49 -                BuildTree(newArmy.Race);
    5.50 -            }
    5.51 -        }
    5.52 +		private void ArmyChanged(Army oldArmy, Army newArmy)
    5.53 +		{
    5.54 +			unitTypeTree.Nodes.Clear();
    5.55  
    5.56 -        private void BuildTree(Race race)
    5.57 -        {
    5.58 -            foreach (Category cat in race.Categories)
    5.59 -            {
    5.60 -                UnitType[] unitTypes = race.GetUnitTypes(cat);
    5.61 -                TreeNode[] unitNodes = new TreeNode[unitTypes.Length];
    5.62 +			if (newArmy != null)
    5.63 +			{
    5.64 +				BuildTree(newArmy.Race);
    5.65 +			}
    5.66 +		}
    5.67  
    5.68 -                for (int i = 0; i < unitTypes.Length; i++)
    5.69 -                {
    5.70 -                    UnitType unitType = unitTypes[i];
    5.71 -                    TreeNode temp = new TreeNode(unitType.Name);
    5.72 -                    temp.Tag = unitType;
    5.73 -                    unitNodes[i] = temp;
    5.74 -                }
    5.75 +		private void BuildTree(Race race)
    5.76 +		{
    5.77 +			foreach (Category cat in race.Categories)
    5.78 +			{
    5.79 +				UnitType[] unitTypes = race.GetUnitTypes(cat);
    5.80  
    5.81 -                TreeNode catTemp = new TreeNode(cat.Name, unitNodes);
    5.82 -                catTemp.Tag = cat;
    5.83 -                unitTypeTree.Nodes.Add(catTemp);
    5.84 -                catTemp.ExpandAll();
    5.85 -            }
    5.86 +				if (unitTypes.Length > 0)
    5.87 +				{
    5.88 +					AddCategoryUnitTypesToTree(cat, unitTypes);
    5.89 +				}
    5.90 +			}
    5.91  
    5.92 -            unitTypeTree.Show();
    5.93 -        }
    5.94 +			unitTypeTree.Show();
    5.95 +		}
    5.96  
    5.97 -        private void unitTypeTree_DoubleClick(object sender, EventArgs e)
    5.98 -        {
    5.99 -            AddUnitType();
   5.100 -        }
   5.101 +		private void AddCategoryUnitTypesToTree(Category cat, UnitType[] unitTypes)
   5.102 +		{
   5.103 +			TreeNode[] unitNodes = new TreeNode[unitTypes.Length];
   5.104  
   5.105 -        private void AddUnitType()
   5.106 -        {
   5.107 -            TreeNode selected = unitTypeTree.SelectedNode;
   5.108 -            AddUnitType(selected);
   5.109 -        }
   5.110 +			for (int i = 0; i < unitTypes.Length; i++)
   5.111 +			{
   5.112 +				UnitType unitType = unitTypes[i];
   5.113 +				TreeNode temp = new TreeNode(unitType.Name);
   5.114 +				temp.Tag = unitType;
   5.115 +				unitNodes[i] = temp;
   5.116 +			}
   5.117  
   5.118 -        private void AddUnitType(TreeNode selected)
   5.119 -        {
   5.120 -            object tagData = selected.Tag;
   5.121 +			TreeNode catTemp = new TreeNode(cat.Name, unitNodes);
   5.122 +			catTemp.Tag = cat;
   5.123 +			unitTypeTree.Nodes.Add(catTemp);
   5.124 +			catTemp.ExpandAll();
   5.125 +		}
   5.126  
   5.127 -            if (tagData is UnitType)
   5.128 -            {
   5.129 -                UnitType unit = (UnitType)tagData;
   5.130 -                Category cat = (Category)selected.Parent.Tag;
   5.131 -                MdiParent.CreateUnitInCategory(unit, cat);
   5.132 -            }
   5.133 -        }
   5.134 +		private void unitTypeTree_DoubleClick(object sender, EventArgs e)
   5.135 +		{
   5.136 +			AddUnitType();
   5.137 +		}
   5.138  
   5.139 -        public new FrmMain MdiParent
   5.140 -        {
   5.141 -            get { return (FrmMain)base.MdiParent; }
   5.142 -            set { base.MdiParent = value; }
   5.143 -        }
   5.144 +		private void AddUnitType()
   5.145 +		{
   5.146 +			TreeNode selected = unitTypeTree.SelectedNode;
   5.147 +			AddUnitType(selected);
   5.148 +		}
   5.149  
   5.150 -        private void AddUnitClicked(object sender, EventArgs e)
   5.151 -        {
   5.152 -            //FIXME: We need to do some kind of maths here
   5.153 -            // context menu position appears to be relative to the window, not the tree control!
   5.154 -            int left = contextMenu.Left - unitTypeTree.Left;
   5.155 -            int top = contextMenu.Top - unitTypeTree.Top;
   5.156 -            TreeNode node = unitTypeTree.GetNodeAt(left, top);
   5.157 +		private void AddUnitType(TreeNode selected)
   5.158 +		{
   5.159 +			object tagData = selected.Tag;
   5.160  
   5.161 -            if (node != null)
   5.162 -            {
   5.163 -                AddUnitType(node);
   5.164 -            }
   5.165 -        }
   5.166 -    }
   5.167 +			if (tagData is UnitType)
   5.168 +			{
   5.169 +				UnitType unit = (UnitType)tagData;
   5.170 +				Category cat = (Category)selected.Parent.Tag;
   5.171 +				MdiParent.CreateUnitInCategory(unit, cat);
   5.172 +			}
   5.173 +		}
   5.174 +
   5.175 +		public new FrmMain MdiParent
   5.176 +		{
   5.177 +			get { return (FrmMain)base.MdiParent; }
   5.178 +			set { base.MdiParent = value; }
   5.179 +		}
   5.180 +
   5.181 +		private void AddUnitClicked(object sender, EventArgs e)
   5.182 +		{
   5.183 +			TreeNode node = unitTypeTree.SelectedNode;
   5.184 +
   5.185 +			if (node != null)
   5.186 +			{
   5.187 +				AddUnitType(node);
   5.188 +			}
   5.189 +		}
   5.190 +
   5.191 +		private void contextMenu_Opening(object sender, CancelEventArgs e)
   5.192 +		{
   5.193 +			TreeNode node = unitTypeTree.SelectedNode;
   5.194 +			e.Cancel = (node == null || !(node.Tag is UnitType));
   5.195 +		}
   5.196 +
   5.197 +		private void unitTypeTree_MouseDown(object sender, MouseEventArgs e)
   5.198 +		{
   5.199 +			if (e.Button == MouseButtons.Right)
   5.200 +			{
   5.201 +				TreeNode tn = unitTypeTree.GetNodeAt(e.X, e.Y);
   5.202 +				unitTypeTree.SelectedNode = tn;
   5.203 +			}
   5.204 +		}
   5.205 +	}
   5.206  }
     6.1 --- a/IBBoard.WarFoundry.GUI.WinForms.csproj	Sat Aug 20 17:05:45 2011 +0100
     6.2 +++ b/IBBoard.WarFoundry.GUI.WinForms.csproj	Sat Aug 20 20:58:16 2011 +0100
     6.3 @@ -120,6 +120,8 @@
     6.4      <Content Include="icons\list-add.png" />
     6.5      <Content Include="icons\warning-sml.png" />
     6.6      <Content Include="libs\log4net.dll" />
     6.7 +    <None Include="Resources\edit-delete.png" />
     6.8 +    <None Include="Resources\edit-edit.png" />
     6.9      <Content Include="WarFoundryPref.xml">
    6.10        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    6.11      </Content>
     7.1 --- a/Properties/Resources.Designer.cs	Sat Aug 20 17:05:45 2011 +0100
     7.2 +++ b/Properties/Resources.Designer.cs	Sat Aug 20 20:58:16 2011 +0100
     7.3 @@ -81,6 +81,20 @@
     7.4              }
     7.5          }
     7.6          
     7.7 +        internal static System.Drawing.Bitmap edit_delete {
     7.8 +            get {
     7.9 +                object obj = ResourceManager.GetObject("edit-delete", resourceCulture);
    7.10 +                return ((System.Drawing.Bitmap)(obj));
    7.11 +            }
    7.12 +        }
    7.13 +        
    7.14 +        internal static System.Drawing.Bitmap edit_edit {
    7.15 +            get {
    7.16 +                object obj = ResourceManager.GetObject("edit-edit", resourceCulture);
    7.17 +                return ((System.Drawing.Bitmap)(obj));
    7.18 +            }
    7.19 +        }
    7.20 +        
    7.21          internal static System.Drawing.Bitmap edit_redo {
    7.22              get {
    7.23                  object obj = ResourceManager.GetObject("edit-redo", resourceCulture);
     8.1 --- a/Properties/Resources.resx	Sat Aug 20 17:05:45 2011 +0100
     8.2 +++ b/Properties/Resources.resx	Sat Aug 20 20:58:16 2011 +0100
     8.3 @@ -112,31 +112,37 @@
     8.4      <value>2.0</value>
     8.5    </resheader>
     8.6    <resheader name="reader">
     8.7 -    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     8.8 +    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     8.9    </resheader>
    8.10    <resheader name="writer">
    8.11 -    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    8.12 +    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    8.13    </resheader>
    8.14 -  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    8.15 -  <data name="edit-redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.16 -    <value>..\icons\edit-redo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.17 -  </data>
    8.18 -  <data name="edit-undo" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.19 -    <value>..\icons\edit-undo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.20 -  </data>
    8.21 -  <data name="document-save" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.22 -    <value>..\icons\document-save.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.23 -  </data>
    8.24 -  <data name="document-new" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.25 -    <value>..\icons\document-new.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.26 -  </data>
    8.27 +  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    8.28    <data name="document-open" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.29      <value>..\icons\document-open.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.30    </data>
    8.31    <data name="list-add" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.32      <value>..\icons\list-add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.33    </data>
    8.34 +  <data name="edit-undo" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.35 +    <value>..\icons\edit-undo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.36 +  </data>
    8.37 +  <data name="document-new" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.38 +    <value>..\icons\document-new.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.39 +  </data>
    8.40 +  <data name="edit-redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.41 +    <value>..\icons\edit-redo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.42 +  </data>
    8.43 +  <data name="document-save" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.44 +    <value>..\icons\document-save.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.45 +  </data>
    8.46    <data name="warning-sml" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.47      <value>..\icons\warning-sml.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.48    </data>
    8.49 +  <data name="edit-delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.50 +    <value>..\Resources\edit-delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.51 +  </data>
    8.52 +  <data name="edit-edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
    8.53 +    <value>..\Resources\edit-edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    8.54 +  </data>
    8.55  </root>
    8.56 \ No newline at end of file
     9.1 Binary file Resources/edit-delete.png has changed
    10.1 Binary file Resources/edit-edit.png has changed
    11.1 --- a/translations/en.translation	Sat Aug 20 17:05:45 2011 +0100
    11.2 +++ b/translations/en.translation	Sat Aug 20 20:58:16 2011 +0100
    11.3 @@ -131,4 +131,6 @@
    11.4    <translation id="treeNodeText">{0} ({1} {2})</translation>
    11.5    <translation id="setUnitEquipmentItemName">( {0} {1} each)</translation>
    11.6    <translation id="FailedRequirementMessage">Army Requirement Failures</translation>
    11.7 +  <translation id="FrmNewUnitFromTree">Available Unit Types</translation>
    11.8 +  <translation id="addUnitMenuItem">Add Unit of Type</translation>
    11.9  </translations>
   11.10 \ No newline at end of file