changeset 36:6ab7ddc038f9

Re #121: Move all code to AGPL * Move all WinForms code to the GNU Affero General Public License * fix some copyright dates
author IBBoard <dev@ibboard.co.uk>
date Sat, 15 Aug 2009 10:15:00 +0000
parents 27b1837c837e
children c07d3b982129
files AssemblyInfo.cs FrmArmyTree.cs FrmDebugOutput.cs FrmEditUnitEquipment.cs FrmMain.cs FrmNewArmy.cs FrmNewUnit.cs FrmNewUnitEquipment.cs FrmReplaceUnitEquipment.cs FrmSelectSystem.cs FrmUnit.cs IBBoard.WarFoundry.GUI.WinForms.csproj UI/StatColumnStyle.cs Util/UnitEquipmentChoice.cs
diffstat 14 files changed, 585 insertions(+), 582 deletions(-) [+]
line wrap: on
line diff
--- a/AssemblyInfo.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/AssemblyInfo.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,3 +1,7 @@
+// This file (AssemblyInfo.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard.
+//
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
+
 using System.Reflection;
 using System.Runtime.CompilerServices;
 
--- a/FrmArmyTree.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/FrmArmyTree.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,6 +1,6 @@
 // This file (FrmArmyTree.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
 //
-// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
 
 using System;
 using System.Drawing;
--- a/FrmDebugOutput.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/FrmDebugOutput.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,6 +1,6 @@
 // This file (FrmDebugOutput.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
 //
-// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
 
 using System;
 using System.Drawing;
--- a/FrmEditUnitEquipment.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/FrmEditUnitEquipment.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,252 +1,252 @@
-// This file (FrmEditUnitEquipment.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
-//
-// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
-
-using System;
-using System.Drawing;
-using System.Collections;
-using System.ComponentModel;
-using System.Windows.Forms;
-using IBBoard.Commands;
-using IBBoard.WarFoundry.API;
-using IBBoard.WarFoundry.API.Commands;
-using IBBoard.WarFoundry.API.Objects;
-
-namespace IBBoard.WarFoundry
-{
-	/// <summary>
-	/// Summary description for FrmEditUnitEquipment.
-	/// </summary>
-	public class FrmEditUnitEquipment : System.Windows.Forms.Form
-	{
-		private Unit unit;
-		private UnitEquipmentItem equipItem;
-		private double equipAmount;
-		private CommandStack commandStack;
-
-		private System.Windows.Forms.NumericUpDown numEquipAmount;
-		private System.Windows.Forms.Label lblPercent;
-		private System.Windows.Forms.Label lblAmount;
-		private System.Windows.Forms.Button bttnCancel;
-		private System.Windows.Forms.Button bttnOkay;
-		private System.Windows.Forms.CheckBox cbEquipAll;
-		/// <summary>
-		/// Required designer variable.
-		/// </summary>
-		private System.ComponentModel.Container components = null;
-
-		public FrmEditUnitEquipment(Unit unit, UnitEquipmentItem equipItem, CommandStack stack)
-		{
-			commandStack = stack;
-			this.unit = unit;
-			this.equipItem = equipItem;
-			InitializeComponent();
-			this.Text = equipItem.Name + " for " + unit.Name;
-			equipAmount = unit.GetEquipmentAmount(equipItem);
-
-			if (equipItem.IsRatioLimit)
-			{
+// This file (FrmEditUnitEquipment.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
+//
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using IBBoard.Commands;
+using IBBoard.WarFoundry.API;
+using IBBoard.WarFoundry.API.Commands;
+using IBBoard.WarFoundry.API.Objects;
+
+namespace IBBoard.WarFoundry
+{
+	/// <summary>
+	/// Summary description for FrmEditUnitEquipment.
+	/// </summary>
+	public class FrmEditUnitEquipment : System.Windows.Forms.Form
+	{
+		private Unit unit;
+		private UnitEquipmentItem equipItem;
+		private double equipAmount;
+		private CommandStack commandStack;
+
+		private System.Windows.Forms.NumericUpDown numEquipAmount;
+		private System.Windows.Forms.Label lblPercent;
+		private System.Windows.Forms.Label lblAmount;
+		private System.Windows.Forms.Button bttnCancel;
+		private System.Windows.Forms.Button bttnOkay;
+		private System.Windows.Forms.CheckBox cbEquipAll;
+		/// <summary>
+		/// Required designer variable.
+		/// </summary>
+		private System.ComponentModel.Container components = null;
+
+		public FrmEditUnitEquipment(Unit unit, UnitEquipmentItem equipItem, CommandStack stack)
+		{
+			commandStack = stack;
+			this.unit = unit;
+			this.equipItem = equipItem;
+			InitializeComponent();
+			this.Text = equipItem.Name + " for " + unit.Name;
+			equipAmount = unit.GetEquipmentAmount(equipItem);
+
+			if (equipItem.IsRatioLimit)
+			{
 				numEquipAmount.Minimum = (decimal)Math.Round(equipItem.MinPercentage, 2);
-				numEquipAmount.Maximum = (decimal)Math.Round(equipItem.MaxPercentage, 2);
-				numEquipAmount.Value = (decimal)Math.Round(equipAmount, 2);
-				cbEquipAll.Enabled = false;
-				lblPercent.Visible = true;
-				numEquipAmount.Width = 120;
-			}
-			else
-			{
-				numEquipAmount.Minimum = (decimal)(equipItem.MinNumber != WarFoundryCore.INFINITY ? equipItem.MinNumber : unit.Size);
-				numEquipAmount.Maximum = (decimal)(equipItem.MaxNumber != WarFoundryCore.INFINITY ? equipItem.MaxNumber : unit.Size);
-				numEquipAmount.Value = (decimal)(equipAmount == WarFoundryCore.INFINITY ? unit.Size : equipAmount);
-				cbEquipAll.Checked = (equipAmount == WarFoundryCore.INFINITY);
-				cbEquipAll.Enabled = (equipItem.MaxNumber == WarFoundryCore.INFINITY && equipItem.MinNumber != WarFoundryCore.INFINITY);
-				numEquipAmount.Enabled = !cbEquipAll.Checked && equipItem.MinNumber != WarFoundryCore.INFINITY;
-				numEquipAmount.Width = 144;
-			}
-
-			bttnOkay.Enabled = false;
-		}
-
-		/// <summary>
-		/// Clean up any resources being used.
-		/// </summary>
-		protected override void Dispose( bool disposing )
-		{
-			if( disposing )
-			{
-				if(components != null)
-				{
-					components.Dispose();
-				}
-			}
-			base.Dispose( disposing );
-		}
-
-		#region Windows Form Designer generated code
-		/// <summary>
-		/// Required method for Designer support - do not modify
-		/// the contents of this method with the code editor.
-		/// </summary>
-		private void InitializeComponent()
-		{
-			this.numEquipAmount = new System.Windows.Forms.NumericUpDown();
-			this.lblPercent = new System.Windows.Forms.Label();
-			this.lblAmount = new System.Windows.Forms.Label();
-			this.bttnCancel = new System.Windows.Forms.Button();
-			this.bttnOkay = new System.Windows.Forms.Button();
-			this.cbEquipAll = new System.Windows.Forms.CheckBox();
-			((System.ComponentModel.ISupportInitialize)(this.numEquipAmount)).BeginInit();
-			this.SuspendLayout();
-			// 
-			// numEquipAmount
-			// 
-			this.numEquipAmount.Location = new System.Drawing.Point(88, 8);
-			this.numEquipAmount.Name = "numEquipAmount";
-			this.numEquipAmount.Size = new System.Drawing.Size(144, 20);
-			this.numEquipAmount.TabIndex = 0;
-			this.numEquipAmount.ValueChanged += new System.EventHandler(this.numEquipAmount_ValueChanged);
-			// 
-			// lblPercent
-			// 
-			this.lblPercent.Location = new System.Drawing.Point(208, 8);
-			this.lblPercent.Name = "lblPercent";
-			this.lblPercent.Size = new System.Drawing.Size(16, 16);
-			this.lblPercent.TabIndex = 1;
-			this.lblPercent.Text = "%";
-			this.lblPercent.Visible = false;
-			// 
-			// lblAmount
-			// 
-			this.lblAmount.Location = new System.Drawing.Point(8, 8);
-			this.lblAmount.Name = "lblAmount";
-			this.lblAmount.Size = new System.Drawing.Size(72, 23);
-			this.lblAmount.TabIndex = 2;
-			this.lblAmount.Text = "amount";
-			this.lblAmount.TextAlign = System.Drawing.ContentAlignment.TopRight;
-			// 
-			// bttnCancel
-			// 
-			this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-			this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
-			this.bttnCancel.Location = new System.Drawing.Point(160, 64);
-			this.bttnCancel.Name = "bttnCancel";
-			this.bttnCancel.TabIndex = 3;
-			this.bttnCancel.Text = "cancel";
-			this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click);
-			// 
-			// bttnOkay
-			// 
-			this.bttnOkay.Enabled = false;
-			this.bttnOkay.FlatStyle = System.Windows.Forms.FlatStyle.System;
-			this.bttnOkay.Location = new System.Drawing.Point(8, 64);
-			this.bttnOkay.Name = "bttnOkay";
-			this.bttnOkay.TabIndex = 4;
-			this.bttnOkay.Text = "okay";
-			this.bttnOkay.Click += new System.EventHandler(this.bttnOkay_Click);
-			// 
-			// cbEquipAll
-			// 
-			this.cbEquipAll.Enabled = false;
-			this.cbEquipAll.FlatStyle = System.Windows.Forms.FlatStyle.System;
-			this.cbEquipAll.Location = new System.Drawing.Point(88, 32);
-			this.cbEquipAll.Name = "cbEquipAll";
-			this.cbEquipAll.TabIndex = 5;
-			this.cbEquipAll.Text = "equip all";
-			this.cbEquipAll.CheckedChanged += new System.EventHandler(this.cbEquipAll_CheckedChanged);
-			// 
-			// FrmEditUnitEquipment
-			// 
-			this.AcceptButton = this.bttnOkay;
-			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
-			this.CancelButton = this.bttnCancel;
-			this.ClientSize = new System.Drawing.Size(240, 92);
-			this.ControlBox = false;
-			this.Controls.Add(this.cbEquipAll);
-			this.Controls.Add(this.bttnOkay);
-			this.Controls.Add(this.bttnCancel);
-			this.Controls.Add(this.lblAmount);
-			this.Controls.Add(this.numEquipAmount);
-			this.Controls.Add(this.lblPercent);
-			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
-			this.Name = "FrmEditUnitEquipment";
-			this.ShowInTaskbar = false;
-			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
-			this.Text = "FrmEditUnitEquipment";
-			((System.ComponentModel.ISupportInitialize)(this.numEquipAmount)).EndInit();
-			this.ResumeLayout(false);
-
-		}
-		#endregion
-
-		private void bttnOkay_Click(object sender, System.EventArgs e)
-		{
-			if (setValue())
-			{
-				this.Close();
-			}
-		}
-
-		private bool setValue()
-		{
-			if ((!numEquipAmount.Enabled || numEquipAmount.Value == 0) && !cbEquipAll.Checked && unit.GetEquipmentAmount(equipItem) != 0)
-			{
-				if (equipItem.IsRequired)
-				{
-					MessageBox.Show(this, "This item is required and cannot be removed. It must have a quantity of at least one or be replaced by an alternative.", "Required item", MessageBoxButtons.OK, MessageBoxIcon.Warning);
-					return false;
-				}
-				else
-				{
-					DialogResult dr = MessageBox.Show(this, "This will remove the item from the unit. Continue?", "Confirm remove", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
-
-					if (dr!=DialogResult.Yes)
-					{
-						return false;
-					}
-				}
-			}
-
-			if (cbEquipAll.Checked)
-			{
-				if (equipAmount != WarFoundryCore.INFINITY)
-				{
-					commandStack.Execute(new SetUnitEquipmentNumericAmountCommand(unit, equipItem, WarFoundryCore.INFINITY));
-				}
-			}
-			else if (numEquipAmount.Value != (decimal)equipAmount)
-			{
-				if (equipItem.IsRatioLimit)
-				{
-					commandStack.Execute(new SetUnitEquipmentRatioAmountCommand(unit, equipItem, (double)numEquipAmount.Value));
-				}
-				else
+				numEquipAmount.Maximum = (decimal)Math.Round(equipItem.MaxPercentage, 2);
+				numEquipAmount.Value = (decimal)Math.Round(equipAmount, 2);
+				cbEquipAll.Enabled = false;
+				lblPercent.Visible = true;
+				numEquipAmount.Width = 120;
+			}
+			else
+			{
+				numEquipAmount.Minimum = (decimal)(equipItem.MinNumber != WarFoundryCore.INFINITY ? equipItem.MinNumber : unit.Size);
+				numEquipAmount.Maximum = (decimal)(equipItem.MaxNumber != WarFoundryCore.INFINITY ? equipItem.MaxNumber : unit.Size);
+				numEquipAmount.Value = (decimal)(equipAmount == WarFoundryCore.INFINITY ? unit.Size : equipAmount);
+				cbEquipAll.Checked = (equipAmount == WarFoundryCore.INFINITY);
+				cbEquipAll.Enabled = (equipItem.MaxNumber == WarFoundryCore.INFINITY && equipItem.MinNumber != WarFoundryCore.INFINITY);
+				numEquipAmount.Enabled = !cbEquipAll.Checked && equipItem.MinNumber != WarFoundryCore.INFINITY;
+				numEquipAmount.Width = 144;
+			}
+
+			bttnOkay.Enabled = false;
+		}
+
+		/// <summary>
+		/// Clean up any resources being used.
+		/// </summary>
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if(components != null)
 				{
-					commandStack.Execute(new SetUnitEquipmentNumericAmountCommand(unit, equipItem, (int)numEquipAmount.Value));
-				}
-			}
-
-			return true;
-		}
-
-		private void bttnCancel_Click(object sender, System.EventArgs e)
-		{
-			this.Close();
-		}
-
-		private void cbEquipAll_CheckedChanged(object sender, System.EventArgs e)
-		{
-			numEquipAmount.Enabled = !cbEquipAll.Checked && equipItem.MinNumber != WarFoundryCore.INFINITY;
-			setOkayButton();
-		}
-
-		private void setOkayButton()
-		{
-			bttnOkay.Enabled = (cbEquipAll.Checked || (numEquipAmount.Enabled && (numEquipAmount.Value > 0 || !equipItem.IsRequired)));
-		}
-
-		private void numEquipAmount_ValueChanged(object sender, System.EventArgs e)
-		{
-			setOkayButton();
-		}
-	}
-}
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+
+		#region Windows Form Designer generated code
+		/// <summary>
+		/// Required method for Designer support - do not modify
+		/// the contents of this method with the code editor.
+		/// </summary>
+		private void InitializeComponent()
+		{
+			this.numEquipAmount = new System.Windows.Forms.NumericUpDown();
+			this.lblPercent = new System.Windows.Forms.Label();
+			this.lblAmount = new System.Windows.Forms.Label();
+			this.bttnCancel = new System.Windows.Forms.Button();
+			this.bttnOkay = new System.Windows.Forms.Button();
+			this.cbEquipAll = new System.Windows.Forms.CheckBox();
+			((System.ComponentModel.ISupportInitialize)(this.numEquipAmount)).BeginInit();
+			this.SuspendLayout();
+			// 
+			// numEquipAmount
+			// 
+			this.numEquipAmount.Location = new System.Drawing.Point(88, 8);
+			this.numEquipAmount.Name = "numEquipAmount";
+			this.numEquipAmount.Size = new System.Drawing.Size(144, 20);
+			this.numEquipAmount.TabIndex = 0;
+			this.numEquipAmount.ValueChanged += new System.EventHandler(this.numEquipAmount_ValueChanged);
+			// 
+			// lblPercent
+			// 
+			this.lblPercent.Location = new System.Drawing.Point(208, 8);
+			this.lblPercent.Name = "lblPercent";
+			this.lblPercent.Size = new System.Drawing.Size(16, 16);
+			this.lblPercent.TabIndex = 1;
+			this.lblPercent.Text = "%";
+			this.lblPercent.Visible = false;
+			// 
+			// lblAmount
+			// 
+			this.lblAmount.Location = new System.Drawing.Point(8, 8);
+			this.lblAmount.Name = "lblAmount";
+			this.lblAmount.Size = new System.Drawing.Size(72, 23);
+			this.lblAmount.TabIndex = 2;
+			this.lblAmount.Text = "amount";
+			this.lblAmount.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// bttnCancel
+			// 
+			this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+			this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
+			this.bttnCancel.Location = new System.Drawing.Point(160, 64);
+			this.bttnCancel.Name = "bttnCancel";
+			this.bttnCancel.TabIndex = 3;
+			this.bttnCancel.Text = "cancel";
+			this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click);
+			// 
+			// bttnOkay
+			// 
+			this.bttnOkay.Enabled = false;
+			this.bttnOkay.FlatStyle = System.Windows.Forms.FlatStyle.System;
+			this.bttnOkay.Location = new System.Drawing.Point(8, 64);
+			this.bttnOkay.Name = "bttnOkay";
+			this.bttnOkay.TabIndex = 4;
+			this.bttnOkay.Text = "okay";
+			this.bttnOkay.Click += new System.EventHandler(this.bttnOkay_Click);
+			// 
+			// cbEquipAll
+			// 
+			this.cbEquipAll.Enabled = false;
+			this.cbEquipAll.FlatStyle = System.Windows.Forms.FlatStyle.System;
+			this.cbEquipAll.Location = new System.Drawing.Point(88, 32);
+			this.cbEquipAll.Name = "cbEquipAll";
+			this.cbEquipAll.TabIndex = 5;
+			this.cbEquipAll.Text = "equip all";
+			this.cbEquipAll.CheckedChanged += new System.EventHandler(this.cbEquipAll_CheckedChanged);
+			// 
+			// FrmEditUnitEquipment
+			// 
+			this.AcceptButton = this.bttnOkay;
+			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+			this.CancelButton = this.bttnCancel;
+			this.ClientSize = new System.Drawing.Size(240, 92);
+			this.ControlBox = false;
+			this.Controls.Add(this.cbEquipAll);
+			this.Controls.Add(this.bttnOkay);
+			this.Controls.Add(this.bttnCancel);
+			this.Controls.Add(this.lblAmount);
+			this.Controls.Add(this.numEquipAmount);
+			this.Controls.Add(this.lblPercent);
+			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+			this.Name = "FrmEditUnitEquipment";
+			this.ShowInTaskbar = false;
+			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+			this.Text = "FrmEditUnitEquipment";
+			((System.ComponentModel.ISupportInitialize)(this.numEquipAmount)).EndInit();
+			this.ResumeLayout(false);
+
+		}
+		#endregion
+
+		private void bttnOkay_Click(object sender, System.EventArgs e)
+		{
+			if (setValue())
+			{
+				this.Close();
+			}
+		}
+
+		private bool setValue()
+		{
+			if ((!numEquipAmount.Enabled || numEquipAmount.Value == 0) && !cbEquipAll.Checked && unit.GetEquipmentAmount(equipItem) != 0)
+			{
+				if (equipItem.IsRequired)
+				{
+					MessageBox.Show(this, "This item is required and cannot be removed. It must have a quantity of at least one or be replaced by an alternative.", "Required item", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+					return false;
+				}
+				else
+				{
+					DialogResult dr = MessageBox.Show(this, "This will remove the item from the unit. Continue?", "Confirm remove", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
+
+					if (dr!=DialogResult.Yes)
+					{
+						return false;
+					}
+				}
+			}
+
+			if (cbEquipAll.Checked)
+			{
+				if (equipAmount != WarFoundryCore.INFINITY)
+				{
+					commandStack.Execute(new SetUnitEquipmentNumericAmountCommand(unit, equipItem, WarFoundryCore.INFINITY));
+				}
+			}
+			else if (numEquipAmount.Value != (decimal)equipAmount)
+			{
+				if (equipItem.IsRatioLimit)
+				{
+					commandStack.Execute(new SetUnitEquipmentRatioAmountCommand(unit, equipItem, (double)numEquipAmount.Value));
+				}
+				else
+				{
+					commandStack.Execute(new SetUnitEquipmentNumericAmountCommand(unit, equipItem, (int)numEquipAmount.Value));
+				}
+			}
+
+			return true;
+		}
+
+		private void bttnCancel_Click(object sender, System.EventArgs e)
+		{
+			this.Close();
+		}
+
+		private void cbEquipAll_CheckedChanged(object sender, System.EventArgs e)
+		{
+			numEquipAmount.Enabled = !cbEquipAll.Checked && equipItem.MinNumber != WarFoundryCore.INFINITY;
+			setOkayButton();
+		}
+
+		private void setOkayButton()
+		{
+			bttnOkay.Enabled = (cbEquipAll.Checked || (numEquipAmount.Enabled && (numEquipAmount.Value > 0 || !equipItem.IsRequired)));
+		}
+
+		private void numEquipAmount_ValueChanged(object sender, System.EventArgs e)
+		{
+			setOkayButton();
+		}
+	}
+}
--- a/FrmMain.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/FrmMain.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,6 +1,6 @@
-// This file (FrmMain.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
+// This file (FrmMain.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard.
 //
-// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
 
 using System;
 using System.Drawing;
--- a/FrmNewArmy.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/FrmNewArmy.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,6 +1,6 @@
-// This file (FrmNewArmy.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
+// This file (FrmNewArmy.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard.
 //
-// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
 
 using System;
 using System.Drawing;
--- a/FrmNewUnit.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/FrmNewUnit.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,6 +1,6 @@
-// This file (FrmNewUnit.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
+// This file (FrmNewUnit.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard.
 //
-// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
 
 using System;
 using System.Drawing;
--- a/FrmNewUnitEquipment.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/FrmNewUnitEquipment.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,6 +1,6 @@
-// This file (FrmNewUnitEquipment.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
+// This file (FrmNewUnitEquipment.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2008, 2009 IBBoard.
 //
-// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
 
 using System;
 using System.Drawing;
--- a/FrmReplaceUnitEquipment.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/FrmReplaceUnitEquipment.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,274 +1,274 @@
-// This file (FrmReplaceUnitEquipment.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
-//
-// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
-
-using System;
-using System.Drawing;
-using System.Collections;
-using System.ComponentModel;
-using System.Windows.Forms;
-using IBBoard;
-using IBBoard.Commands;
-using IBBoard.WarFoundry.API;
-using IBBoard.WarFoundry.API.Commands;
-using IBBoard.WarFoundry.API.Objects;
-
-namespace IBBoard.WarFoundry
-{
-	/// <summary>
-	/// Summary description for FrmNewUnitEquipment.
-	/// </summary>
-	public class FrmReplaceUnitEquipment : System.Windows.Forms.Form
-	{
-		private Unit unit;
-		private UnitEquipmentItem oldItem;
-		private bool required;
-		private CommandStack commandStack;
-
-		private System.Windows.Forms.NumericUpDown numEquipAmount;
-		private System.Windows.Forms.Label lblPercent;
-		private System.Windows.Forms.Label lblAmount;
-		private System.Windows.Forms.Button bttnCancel;
-		private System.Windows.Forms.Button bttnOkay;
-		private System.Windows.Forms.CheckBox cbEquipAll;
-		private System.Windows.Forms.Label lblItem;
-		private System.Windows.Forms.ListBox listItems;
-		/// <summary>
-		/// Required designer variable.
-		/// </summary>
-		private System.ComponentModel.Container components = null;
-
-		public FrmReplaceUnitEquipment(Unit unit, UnitEquipmentItem item, CommandStack stack)
-		{
-			commandStack = stack;
-			this.unit = unit;
-			oldItem = item;
-			InitializeComponent();
-			this.Text = "Replace " + item.EquipmentItem.Name + " with new equipment";
-			object[] items = Arrays.Subtract(unit.UnitType.GetEquipmentItemsByExclusionGroup(item.MutexGroup), unit.GetEquipment());
-			listItems.Items.AddRange(items);
-		}
-
-		/// <summary>
-		/// Clean up any resources being used.
-		/// </summary>
-		protected override void Dispose( bool disposing )
-		{
-			if( disposing )
-			{
-				if(components != null)
-				{
-					components.Dispose();
-				}
-			}
-			base.Dispose( disposing );
-		}
-
-		#region Windows Form Designer generated code
-		/// <summary>
-		/// Required method for Designer support - do not modify
-		/// the contents of this method with the code editor.
-		/// </summary>
-		private void InitializeComponent()
-		{
-			this.numEquipAmount = new System.Windows.Forms.NumericUpDown();
-			this.lblPercent = new System.Windows.Forms.Label();
-			this.lblAmount = new System.Windows.Forms.Label();
-			this.bttnCancel = new System.Windows.Forms.Button();
-			this.bttnOkay = new System.Windows.Forms.Button();
-			this.cbEquipAll = new System.Windows.Forms.CheckBox();
-			this.lblItem = new System.Windows.Forms.Label();
-			this.listItems = new System.Windows.Forms.ListBox();
-			((System.ComponentModel.ISupportInitialize)(this.numEquipAmount)).BeginInit();
-			this.SuspendLayout();
-			// 
-			// numEquipAmount
-			// 
-			this.numEquipAmount.Enabled = false;
-			this.numEquipAmount.Location = new System.Drawing.Point(88, 80);
-			this.numEquipAmount.Name = "numEquipAmount";
-			this.numEquipAmount.Size = new System.Drawing.Size(144, 20);
-			this.numEquipAmount.TabIndex = 0;
-			this.numEquipAmount.ValueChanged += new System.EventHandler(this.numEquipAmount_ValueChanged);
-			// 
-			// lblPercent
-			// 
-			this.lblPercent.Location = new System.Drawing.Point(208, 80);
-			this.lblPercent.Name = "lblPercent";
-			this.lblPercent.Size = new System.Drawing.Size(16, 16);
-			this.lblPercent.TabIndex = 1;
-			this.lblPercent.Text = "%";
-			this.lblPercent.Visible = false;
-			// 
-			// lblAmount
-			// 
-			this.lblAmount.Location = new System.Drawing.Point(8, 80);
-			this.lblAmount.Name = "lblAmount";
-			this.lblAmount.Size = new System.Drawing.Size(72, 23);
-			this.lblAmount.TabIndex = 2;
-			this.lblAmount.Text = "amount";
-			this.lblAmount.TextAlign = System.Drawing.ContentAlignment.TopRight;
-			// 
-			// bttnCancel
-			// 
-			this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-			this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
-			this.bttnCancel.Location = new System.Drawing.Point(160, 136);
-			this.bttnCancel.Name = "bttnCancel";
-			this.bttnCancel.TabIndex = 3;
-			this.bttnCancel.Text = "cancel";
-			this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click);
-			// 
-			// bttnOkay
-			// 
-			this.bttnOkay.Enabled = false;
-			this.bttnOkay.FlatStyle = System.Windows.Forms.FlatStyle.System;
-			this.bttnOkay.Location = new System.Drawing.Point(8, 136);
-			this.bttnOkay.Name = "bttnOkay";
-			this.bttnOkay.TabIndex = 4;
-			this.bttnOkay.Text = "okay";
-			this.bttnOkay.Click += new System.EventHandler(this.bttnOkay_Click);
-			// 
-			// cbEquipAll
-			// 
-			this.cbEquipAll.Enabled = false;
-			this.cbEquipAll.FlatStyle = System.Windows.Forms.FlatStyle.System;
-			this.cbEquipAll.Location = new System.Drawing.Point(88, 104);
-			this.cbEquipAll.Name = "cbEquipAll";
-			this.cbEquipAll.TabIndex = 5;
-			this.cbEquipAll.Text = "equip all";
-			this.cbEquipAll.CheckedChanged += new System.EventHandler(this.cbEquipAll_CheckedChanged);
-			// 
-			// lblItem
-			// 
-			this.lblItem.Location = new System.Drawing.Point(0, 8);
-			this.lblItem.Name = "lblItem";
-			this.lblItem.Size = new System.Drawing.Size(80, 23);
-			this.lblItem.TabIndex = 6;
-			this.lblItem.Text = "item";
-			this.lblItem.TextAlign = System.Drawing.ContentAlignment.TopRight;
-			// 
-			// listItems
-			// 
-			this.listItems.Location = new System.Drawing.Point(88, 8);
-			this.listItems.Name = "listItems";
-			this.listItems.Size = new System.Drawing.Size(144, 69);
-			this.listItems.TabIndex = 7;
-			this.listItems.SelectedIndexChanged += new System.EventHandler(this.listItems_SelectedIndexChanged);
-			// 
-			// FrmReplaceUnitEquipment
-			// 
-			this.AcceptButton = this.bttnOkay;
-			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
-			this.CancelButton = this.bttnCancel;
-			this.ClientSize = new System.Drawing.Size(240, 164);
-			this.ControlBox = false;
-			this.Controls.Add(this.listItems);
-			this.Controls.Add(this.lblItem);
-			this.Controls.Add(this.cbEquipAll);
-			this.Controls.Add(this.bttnOkay);
-			this.Controls.Add(this.bttnCancel);
-			this.Controls.Add(this.lblAmount);
-			this.Controls.Add(this.numEquipAmount);
-			this.Controls.Add(this.lblPercent);
-			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
-			this.Name = "FrmReplaceUnitEquipment";
-			this.ShowInTaskbar = false;
-			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
-			this.Text = "FrmEditUnitEquipment";
-			((System.ComponentModel.ISupportInitialize)(this.numEquipAmount)).EndInit();
-			this.ResumeLayout(false);
-
-		}
-		#endregion
-
-		private void bttnOkay_Click(object sender, System.EventArgs e)
-		{
-			setValue();
-			this.Close();
-		}
-
-		private void setValue()
-		{
-			UnitEquipmentItem equipItem = (UnitEquipmentItem)listItems.SelectedItem;
-
-			if (cbEquipAll.Checked)
-			{
-                commandStack.Execute(new ReplaceUnitEquipmentWithNumericAmountItemCommand(unit, oldItem, equipItem, WarFoundryCore.INFINITY));
-			}
-			else
-			{
-                if (equipItem.IsRatioLimit)
-				{
-                    commandStack.Execute(new ReplaceUnitEquipmentWithRatioAmountItemCommand(unit, oldItem, equipItem, (double)numEquipAmount.Value));
-				}
-				else
+// This file (FrmReplaceUnitEquipment.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2008, 2009 IBBoard.
+//
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using IBBoard;
+using IBBoard.Commands;
+using IBBoard.WarFoundry.API;
+using IBBoard.WarFoundry.API.Commands;
+using IBBoard.WarFoundry.API.Objects;
+
+namespace IBBoard.WarFoundry
+{
+	/// <summary>
+	/// Summary description for FrmNewUnitEquipment.
+	/// </summary>
+	public class FrmReplaceUnitEquipment : System.Windows.Forms.Form
+	{
+		private Unit unit;
+		private UnitEquipmentItem oldItem;
+		private bool required;
+		private CommandStack commandStack;
+
+		private System.Windows.Forms.NumericUpDown numEquipAmount;
+		private System.Windows.Forms.Label lblPercent;
+		private System.Windows.Forms.Label lblAmount;
+		private System.Windows.Forms.Button bttnCancel;
+		private System.Windows.Forms.Button bttnOkay;
+		private System.Windows.Forms.CheckBox cbEquipAll;
+		private System.Windows.Forms.Label lblItem;
+		private System.Windows.Forms.ListBox listItems;
+		/// <summary>
+		/// Required designer variable.
+		/// </summary>
+		private System.ComponentModel.Container components = null;
+
+		public FrmReplaceUnitEquipment(Unit unit, UnitEquipmentItem item, CommandStack stack)
+		{
+			commandStack = stack;
+			this.unit = unit;
+			oldItem = item;
+			InitializeComponent();
+			this.Text = "Replace " + item.EquipmentItem.Name + " with new equipment";
+			object[] items = Arrays.Subtract(unit.UnitType.GetEquipmentItemsByExclusionGroup(item.MutexGroup), unit.GetEquipment());
+			listItems.Items.AddRange(items);
+		}
+
+		/// <summary>
+		/// Clean up any resources being used.
+		/// </summary>
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if(components != null)
 				{
-					commandStack.Execute(new ReplaceUnitEquipmentWithNumericAmountItemCommand(unit, oldItem, equipItem, (int)numEquipAmount.Value));
-				}
-			}
-		}
-
-		private void bttnCancel_Click(object sender, System.EventArgs e)
-		{
-			this.Close();
-		}
-
-		private void cbEquipAll_CheckedChanged(object sender, System.EventArgs e)
-		{
-			numEquipAmount.Enabled = ((UnitEquipmentItem)listItems.SelectedItem).MinNumber != WarFoundryCore.INFINITY && !cbEquipAll.Checked;
-			setOkayButton();
-		}
-
-		private void listItems_SelectedIndexChanged(object sender, System.EventArgs e)
-		{
-			refreshNumber();
-			setOkayButton();
-		}
-
-		private void refreshNumber()
-		{
-			if (listItems.SelectedIndex > -1)
-			{
-				UnitEquipmentItem equipItem = (UnitEquipmentItem)listItems.SelectedItem;
-				required = equipItem.IsRequired;
-
-                if (equipItem.IsRatioLimit)
-				{
-                    numEquipAmount.Minimum = (decimal)Math.Round(equipItem.MinNumber * 100.0, 2);
-                    numEquipAmount.Maximum = (decimal)Math.Round(equipItem.MaxNumber * 100.0, 2);
-					numEquipAmount.Value = numEquipAmount.Minimum;
-					cbEquipAll.Enabled = false;
-					lblPercent.Visible = true;
-					numEquipAmount.Width = 120;
-				}
-				else
-				{
-                    numEquipAmount.Minimum = (decimal)(equipItem.MinNumber != WarFoundryCore.INFINITY ? equipItem.MinNumber : unit.Size);
-                    numEquipAmount.Maximum = (decimal)(equipItem.MaxNumber != WarFoundryCore.INFINITY ? equipItem.MaxNumber : unit.Size);
-					numEquipAmount.Value = numEquipAmount.Minimum;
-                    cbEquipAll.Enabled = (equipItem.MaxNumber == WarFoundryCore.INFINITY && equipItem.MinNumber != WarFoundryCore.INFINITY);
-                    cbEquipAll.Checked = equipItem.MinNumber == WarFoundryCore.INFINITY;
-					numEquipAmount.Width = 144;
-				}
-			}
-			else
-			{
-				numEquipAmount.Minimum = 0;
-				numEquipAmount.Value = 0;
-				numEquipAmount.Enabled = false;
-				cbEquipAll.Enabled = false;
-			}
-		}
-
-		private void setOkayButton()
-		{
-			bttnOkay.Enabled = listItems.SelectedIndex > -1 && (cbEquipAll.Checked || (numEquipAmount.Enabled && numEquipAmount.Value > 0));
-		}
-
-		private void numEquipAmount_ValueChanged(object sender, System.EventArgs e)
-		{			
-			setOkayButton();
-		}
-	}
-}
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+
+		#region Windows Form Designer generated code
+		/// <summary>
+		/// Required method for Designer support - do not modify
+		/// the contents of this method with the code editor.
+		/// </summary>
+		private void InitializeComponent()
+		{
+			this.numEquipAmount = new System.Windows.Forms.NumericUpDown();
+			this.lblPercent = new System.Windows.Forms.Label();
+			this.lblAmount = new System.Windows.Forms.Label();
+			this.bttnCancel = new System.Windows.Forms.Button();
+			this.bttnOkay = new System.Windows.Forms.Button();
+			this.cbEquipAll = new System.Windows.Forms.CheckBox();
+			this.lblItem = new System.Windows.Forms.Label();
+			this.listItems = new System.Windows.Forms.ListBox();
+			((System.ComponentModel.ISupportInitialize)(this.numEquipAmount)).BeginInit();
+			this.SuspendLayout();
+			// 
+			// numEquipAmount
+			// 
+			this.numEquipAmount.Enabled = false;
+			this.numEquipAmount.Location = new System.Drawing.Point(88, 80);
+			this.numEquipAmount.Name = "numEquipAmount";
+			this.numEquipAmount.Size = new System.Drawing.Size(144, 20);
+			this.numEquipAmount.TabIndex = 0;
+			this.numEquipAmount.ValueChanged += new System.EventHandler(this.numEquipAmount_ValueChanged);
+			// 
+			// lblPercent
+			// 
+			this.lblPercent.Location = new System.Drawing.Point(208, 80);
+			this.lblPercent.Name = "lblPercent";
+			this.lblPercent.Size = new System.Drawing.Size(16, 16);
+			this.lblPercent.TabIndex = 1;
+			this.lblPercent.Text = "%";
+			this.lblPercent.Visible = false;
+			// 
+			// lblAmount
+			// 
+			this.lblAmount.Location = new System.Drawing.Point(8, 80);
+			this.lblAmount.Name = "lblAmount";
+			this.lblAmount.Size = new System.Drawing.Size(72, 23);
+			this.lblAmount.TabIndex = 2;
+			this.lblAmount.Text = "amount";
+			this.lblAmount.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// bttnCancel
+			// 
+			this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+			this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
+			this.bttnCancel.Location = new System.Drawing.Point(160, 136);
+			this.bttnCancel.Name = "bttnCancel";
+			this.bttnCancel.TabIndex = 3;
+			this.bttnCancel.Text = "cancel";
+			this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click);
+			// 
+			// bttnOkay
+			// 
+			this.bttnOkay.Enabled = false;
+			this.bttnOkay.FlatStyle = System.Windows.Forms.FlatStyle.System;
+			this.bttnOkay.Location = new System.Drawing.Point(8, 136);
+			this.bttnOkay.Name = "bttnOkay";
+			this.bttnOkay.TabIndex = 4;
+			this.bttnOkay.Text = "okay";
+			this.bttnOkay.Click += new System.EventHandler(this.bttnOkay_Click);
+			// 
+			// cbEquipAll
+			// 
+			this.cbEquipAll.Enabled = false;
+			this.cbEquipAll.FlatStyle = System.Windows.Forms.FlatStyle.System;
+			this.cbEquipAll.Location = new System.Drawing.Point(88, 104);
+			this.cbEquipAll.Name = "cbEquipAll";
+			this.cbEquipAll.TabIndex = 5;
+			this.cbEquipAll.Text = "equip all";
+			this.cbEquipAll.CheckedChanged += new System.EventHandler(this.cbEquipAll_CheckedChanged);
+			// 
+			// lblItem
+			// 
+			this.lblItem.Location = new System.Drawing.Point(0, 8);
+			this.lblItem.Name = "lblItem";
+			this.lblItem.Size = new System.Drawing.Size(80, 23);
+			this.lblItem.TabIndex = 6;
+			this.lblItem.Text = "item";
+			this.lblItem.TextAlign = System.Drawing.ContentAlignment.TopRight;
+			// 
+			// listItems
+			// 
+			this.listItems.Location = new System.Drawing.Point(88, 8);
+			this.listItems.Name = "listItems";
+			this.listItems.Size = new System.Drawing.Size(144, 69);
+			this.listItems.TabIndex = 7;
+			this.listItems.SelectedIndexChanged += new System.EventHandler(this.listItems_SelectedIndexChanged);
+			// 
+			// FrmReplaceUnitEquipment
+			// 
+			this.AcceptButton = this.bttnOkay;
+			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+			this.CancelButton = this.bttnCancel;
+			this.ClientSize = new System.Drawing.Size(240, 164);
+			this.ControlBox = false;
+			this.Controls.Add(this.listItems);
+			this.Controls.Add(this.lblItem);
+			this.Controls.Add(this.cbEquipAll);
+			this.Controls.Add(this.bttnOkay);
+			this.Controls.Add(this.bttnCancel);
+			this.Controls.Add(this.lblAmount);
+			this.Controls.Add(this.numEquipAmount);
+			this.Controls.Add(this.lblPercent);
+			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+			this.Name = "FrmReplaceUnitEquipment";
+			this.ShowInTaskbar = false;
+			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+			this.Text = "FrmEditUnitEquipment";
+			((System.ComponentModel.ISupportInitialize)(this.numEquipAmount)).EndInit();
+			this.ResumeLayout(false);
+
+		}
+		#endregion
+
+		private void bttnOkay_Click(object sender, System.EventArgs e)
+		{
+			setValue();
+			this.Close();
+		}
+
+		private void setValue()
+		{
+			UnitEquipmentItem equipItem = (UnitEquipmentItem)listItems.SelectedItem;
+
+			if (cbEquipAll.Checked)
+			{
+                commandStack.Execute(new ReplaceUnitEquipmentWithNumericAmountItemCommand(unit, oldItem, equipItem, WarFoundryCore.INFINITY));
+			}
+			else
+			{
+                if (equipItem.IsRatioLimit)
+				{
+                    commandStack.Execute(new ReplaceUnitEquipmentWithRatioAmountItemCommand(unit, oldItem, equipItem, (double)numEquipAmount.Value));
+				}
+				else
+				{
+					commandStack.Execute(new ReplaceUnitEquipmentWithNumericAmountItemCommand(unit, oldItem, equipItem, (int)numEquipAmount.Value));
+				}
+			}
+		}
+
+		private void bttnCancel_Click(object sender, System.EventArgs e)
+		{
+			this.Close();
+		}
+
+		private void cbEquipAll_CheckedChanged(object sender, System.EventArgs e)
+		{
+			numEquipAmount.Enabled = ((UnitEquipmentItem)listItems.SelectedItem).MinNumber != WarFoundryCore.INFINITY && !cbEquipAll.Checked;
+			setOkayButton();
+		}
+
+		private void listItems_SelectedIndexChanged(object sender, System.EventArgs e)
+		{
+			refreshNumber();
+			setOkayButton();
+		}
+
+		private void refreshNumber()
+		{
+			if (listItems.SelectedIndex > -1)
+			{
+				UnitEquipmentItem equipItem = (UnitEquipmentItem)listItems.SelectedItem;
+				required = equipItem.IsRequired;
+
+                if (equipItem.IsRatioLimit)
+				{
+                    numEquipAmount.Minimum = (decimal)Math.Round(equipItem.MinNumber * 100.0, 2);
+                    numEquipAmount.Maximum = (decimal)Math.Round(equipItem.MaxNumber * 100.0, 2);
+					numEquipAmount.Value = numEquipAmount.Minimum;
+					cbEquipAll.Enabled = false;
+					lblPercent.Visible = true;
+					numEquipAmount.Width = 120;
+				}
+				else
+				{
+                    numEquipAmount.Minimum = (decimal)(equipItem.MinNumber != WarFoundryCore.INFINITY ? equipItem.MinNumber : unit.Size);
+                    numEquipAmount.Maximum = (decimal)(equipItem.MaxNumber != WarFoundryCore.INFINITY ? equipItem.MaxNumber : unit.Size);
+					numEquipAmount.Value = numEquipAmount.Minimum;
+                    cbEquipAll.Enabled = (equipItem.MaxNumber == WarFoundryCore.INFINITY && equipItem.MinNumber != WarFoundryCore.INFINITY);
+                    cbEquipAll.Checked = equipItem.MinNumber == WarFoundryCore.INFINITY;
+					numEquipAmount.Width = 144;
+				}
+			}
+			else
+			{
+				numEquipAmount.Minimum = 0;
+				numEquipAmount.Value = 0;
+				numEquipAmount.Enabled = false;
+				cbEquipAll.Enabled = false;
+			}
+		}
+
+		private void setOkayButton()
+		{
+			bttnOkay.Enabled = listItems.SelectedIndex > -1 && (cbEquipAll.Checked || (numEquipAmount.Enabled && numEquipAmount.Value > 0));
+		}
+
+		private void numEquipAmount_ValueChanged(object sender, System.EventArgs e)
+		{			
+			setOkayButton();
+		}
+	}
+}
--- a/FrmSelectSystem.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/FrmSelectSystem.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,6 +1,6 @@
-// This file (FrmSelectSystem.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
+// This file (FrmSelectSystem.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard.
 //
-// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
 
 using System;
 using System.IO;
--- a/FrmUnit.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/FrmUnit.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,6 +1,6 @@
-// This file (FrmUnit.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
+// This file (FrmUnit.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard.
 //
-// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
 
 using System;
 using System.Drawing;
--- a/IBBoard.WarFoundry.GUI.WinForms.csproj	Sat Aug 15 09:38:21 2009 +0000
+++ b/IBBoard.WarFoundry.GUI.WinForms.csproj	Sat Aug 15 10:15:00 2009 +0000
@@ -182,12 +182,7 @@
       <DependentUpon>FrmUnit.cs</DependentUpon>
     </EmbeddedResource>
     <None Include="app.config" />
-    <None Include="COPYING.GPL">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </None>
-    <None Include="COPYING.LGPL">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </None>
+    <None Include="COPYING" />
     <None Include="translations\en.translation">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
--- a/UI/StatColumnStyle.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/UI/StatColumnStyle.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,3 +1,7 @@
+// This file (StatColumnStyle.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
+//
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
+
 using System;
 using System.Drawing;
 using System.Text;
--- a/Util/UnitEquipmentChoice.cs	Sat Aug 15 09:38:21 2009 +0000
+++ b/Util/UnitEquipmentChoice.cs	Sat Aug 15 10:15:00 2009 +0000
@@ -1,35 +1,35 @@
-// This file (UnitEquipmentChoice.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2009 IBBoard.
-//
-// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
-
-using System;
-using System.Collections;
-using IBBoard.WarFoundry.API.Objects;
-
-
-
-namespace IBBoard.WarFoundry.GUI.WinForms.Util
-{
-    /// <summary>
-    /// A helper object that holds an equipment choice for a unit.
-    /// </summary>
-
-    public class UnitEquipmentChoice
-    {
-        private Unit unit;
-		private UnitEquipmentItem item;
-
-        private static Hashtable equipObjs = new Hashtable();
-
-        public UnitEquipmentChoice(Unit unit, UnitEquipmentItem unitItem)
-        {
-            this.unit = unit;
-            item = unitItem;
-        }
-
-        public override string ToString()
-        {
-            return String.Format("{0} (For {1} at {2}pts each)", item.Name, GetAmountString(), item.Cost);
+// This file (UnitEquipmentChoice.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
+//
+// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
+
+using System;
+using System.Collections;
+using IBBoard.WarFoundry.API.Objects;
+
+
+
+namespace IBBoard.WarFoundry.GUI.WinForms.Util
+{
+    /// <summary>
+    /// A helper object that holds an equipment choice for a unit.
+    /// </summary>
+
+    public class UnitEquipmentChoice
+    {
+        private Unit unit;
+		private UnitEquipmentItem item;
+
+        private static Hashtable equipObjs = new Hashtable();
+
+        public UnitEquipmentChoice(Unit unit, UnitEquipmentItem unitItem)
+        {
+            this.unit = unit;
+            item = unitItem;
+        }
+
+        public override string ToString()
+        {
+            return String.Format("{0} (For {1} at {2}pts each)", item.Name, GetAmountString(), item.Cost);
         }
 
 		private string GetAmountString()
@@ -42,11 +42,11 @@
 			{
 				return UnitEquipmentNumericSelection.GetEquipmentAmountString(unit.GetEquipmentAmount(item));
 			}
-		}
-
-        public UnitEquipmentItem Item
-        {
-            get { return item; }
-        }
-    }
+		}
+
+        public UnitEquipmentItem Item
+        {
+            get { return item; }
+        }
+    }
 }
\ No newline at end of file