changeset 145:51463bc1fb21

Fixes #265: Add language preference UI * Make unit equipment lines refresh when language changes
author IBBoard <dev@ibboard.co.uk>
date Sun, 18 Apr 2010 14:22:10 +0000
parents 4023a9bdcb8b
children 5d9d4c75305f
files FrmUnit.cs
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/FrmUnit.cs	Sun Apr 18 14:12:09 2010 +0000
+++ b/FrmUnit.cs	Sun Apr 18 14:22:10 2010 +0000
@@ -81,6 +81,7 @@
 			ControlTranslator.TranslateControl(this);
 			tbUnitName.Text = unit.Name;
 			Text = Translation.GetTranslation("FrmUnit", "{0}", unit.Name);
+			RefreshUnitEquipment();
 		}
 
 		void unit_PointsValueChanged(WarFoundryObject obj, double oldValue, double newValue)
@@ -467,10 +468,15 @@
 			{
 				unitSize.Value = newValue;
 
-				foreach (UnitEquipmentChoice choice in equipmentChoices.Values)
-				{
-					SetEquipmentListValue(choice);
-				}
+				RefreshUnitEquipment();
+			}
+		}
+
+		private void RefreshUnitEquipment()
+		{
+			foreach (UnitEquipmentChoice choice in equipmentChoices.Values)
+			{
+				SetEquipmentListValue(choice);
 			}
 		}