Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.WinForms
comparison UI/EquipmentAmountControl.cs @ 93:37126221efa6
Re #208
* Make sure that the appropriate radio button is set when editing existing equipment instead of defaulting to the equipment type's radio button selection
no-open-ticket
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 09 Nov 2009 12:31:42 +0000 |
parents | e1e3957db129 |
children | 057498981bde |
comparison
equal
deleted
inserted
replaced
92:04ca17389f13 | 93:37126221efa6 |
---|---|
206 bool isRatio = unit.GetEquipmentAmountIsRatio(equip); | 206 bool isRatio = unit.GetEquipmentAmountIsRatio(equip); |
207 | 207 |
208 if (isRatio) | 208 if (isRatio) |
209 { | 209 { |
210 SetEquipmentAmountsFromPercentage(equipAmountNum); | 210 SetEquipmentAmountsFromPercentage(equipAmountNum); |
211 | |
212 if (equipAmountNum == 100) | |
213 { | |
214 rbEquipAll.Checked = true; | |
215 } | |
216 else | |
217 { | |
218 rbPercentage.Checked = true; | |
219 } | |
211 } | 220 } |
212 else | 221 else |
213 { | 222 { |
214 int equipAmount = (int) equipAmountNum; | 223 int equipAmount = (int) equipAmountNum; |
215 SetEquipmentAmountsFromNumber(equipAmount); | 224 SetEquipmentAmountsFromNumber(equipAmount); |
225 rbNumeric.Checked = true; | |
216 } | 226 } |
217 } | 227 } |
218 } | 228 } |
219 | 229 |
220 private void SetEquipmentAmountsFromPercentage(double equipAmountNum) | 230 private void SetEquipmentAmountsFromPercentage(double equipAmountNum) |