Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.WinForms
diff FrmUnit.cs @ 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 | 28105d9c2b25 |
children | 0e3837170637 |
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); } }