comparison FrmUnit.cs @ 34:3ceb0efd261f

Re #118: Allow equipment amounts of "ratio" equipment to be define as absolute or ratio amounts * Use new commands created in previous revision Re #122: Make usage of percentage or ratio common * Make sure all usage of percentages are correct Re #117: Add percentage and number boxes to equipment item dialogs * Fix some enable/disable inconsistencies for percentage amounts * Fix problems where fixed limits weren't honoured by widgets
author IBBoard <dev@ibboard.co.uk>
date Thu, 13 Aug 2009 21:16:21 +0000
parents 526fefefb16b
children 6ab7ddc038f9
comparison
equal deleted inserted replaced
33:67c283ea77a7 34:3ceb0efd261f
17 using IBBoard.WarFoundry.WinForms.UI; 17 using IBBoard.WarFoundry.WinForms.UI;
18 using IBBoard.WarFoundry.GUI.WinForms.Util; 18 using IBBoard.WarFoundry.GUI.WinForms.Util;
19 19
20 namespace IBBoard.WarFoundry.WinForms 20 namespace IBBoard.WarFoundry.WinForms
21 { 21 {
22 ///TODO: Separate weapons out into optional and required, where required only has button for replacing
23
24 /// <summary> 22 /// <summary>
25 /// Summary description for FrmUnit. 23 /// Summary description for FrmUnit.
26 /// </summary> 24 /// </summary>
27 public class FrmUnit : IBBoard.Windows.Forms.IBBForm 25 public class FrmUnit : IBBoard.Windows.Forms.IBBForm
28 { 26 {
502 addWeapon(); 500 addWeapon();
503 } 501 }
504 502
505 private void removeWeapon() 503 private void removeWeapon()
506 { 504 {
507 commandStack.Execute(new SetUnitEquipmentAmountCommand(unit, ((UnitEquipmentChoice) optList.SelectedItem).Item, 0)); 505 commandStack.Execute(new SetUnitEquipmentNumericAmountCommand(unit, ((UnitEquipmentChoice) optList.SelectedItem).Item, 0));
508 } 506 }
509 507
510 private void bttnRemoveWeapon_Click(object sender, System.EventArgs e) 508 private void bttnRemoveWeapon_Click(object sender, System.EventArgs e)
511 { 509 {
512 removeWeapon(); 510 removeWeapon();