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 diff
     1.1 --- a/FrmUnit.cs	Sun Apr 18 14:12:09 2010 +0000
     1.2 +++ b/FrmUnit.cs	Sun Apr 18 14:22:10 2010 +0000
     1.3 @@ -81,6 +81,7 @@
     1.4  			ControlTranslator.TranslateControl(this);
     1.5  			tbUnitName.Text = unit.Name;
     1.6  			Text = Translation.GetTranslation("FrmUnit", "{0}", unit.Name);
     1.7 +			RefreshUnitEquipment();
     1.8  		}
     1.9  
    1.10  		void unit_PointsValueChanged(WarFoundryObject obj, double oldValue, double newValue)
    1.11 @@ -467,10 +468,15 @@
    1.12  			{
    1.13  				unitSize.Value = newValue;
    1.14  
    1.15 -				foreach (UnitEquipmentChoice choice in equipmentChoices.Values)
    1.16 -				{
    1.17 -					SetEquipmentListValue(choice);
    1.18 -				}
    1.19 +				RefreshUnitEquipment();
    1.20 +			}
    1.21 +		}
    1.22 +
    1.23 +		private void RefreshUnitEquipment()
    1.24 +		{
    1.25 +			foreach (UnitEquipmentChoice choice in equipmentChoices.Values)
    1.26 +			{
    1.27 +				SetEquipmentListValue(choice);
    1.28  			}
    1.29  		}
    1.30