Mercurial > repos > IBBoard.WarFoundry.GUI.WinForms
comparison FrmNewUnitEquipment.cs @ 76:f2006db02ad9
Re #192: Improve "clean coding" practice
* Use new methods in WinForms UI
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 04 Oct 2009 14:24:52 +0000 |
parents | bdd10c56a917 |
children | 0bb9f40d44eb |
comparison
equal
deleted
inserted
replaced
75:bdd10c56a917 | 76:f2006db02ad9 |
---|---|
10 using IBBoard.Commands; | 10 using IBBoard.Commands; |
11 using IBBoard.Lang; | 11 using IBBoard.Lang; |
12 using IBBoard.WarFoundry.API; | 12 using IBBoard.WarFoundry.API; |
13 using IBBoard.WarFoundry.API.Commands; | 13 using IBBoard.WarFoundry.API.Commands; |
14 using IBBoard.WarFoundry.API.Objects; | 14 using IBBoard.WarFoundry.API.Objects; |
15 using IBBoard.WarFoundry.API.Util; | |
15 using IBBoard.WarFoundry.GUI.WinForms.Util; | 16 using IBBoard.WarFoundry.GUI.WinForms.Util; |
16 | 17 |
17 namespace IBBoard.WarFoundry.GUI.WinForms | 18 namespace IBBoard.WarFoundry.GUI.WinForms |
18 { | 19 { |
19 /// <summary> | 20 /// <summary> |
38 { | 39 { |
39 commandStack = stack; | 40 commandStack = stack; |
40 this.unit = unit; | 41 this.unit = unit; |
41 InitializeComponent(); | 42 InitializeComponent(); |
42 this.Text = "New equipment for " + unit.Name; | 43 this.Text = "New equipment for " + unit.Name; |
43 object[] items = Arrays.Subtract(unit.GetAllowedAdditionalEquipment(), unit.GetEquipment()); | 44 object[] items = Arrays.Subtract(UnitEquipmentUtil.GetAllowedEquipmentItems(unit), unit.GetEquipment()); |
44 listItems.Items.AddRange(items); | 45 listItems.Items.AddRange(items); |
45 equipmentAmount.SetUnit(unit); | 46 equipmentAmount.SetUnit(unit); |
46 } | 47 } |
47 | 48 |
48 /// <summary> | 49 /// <summary> |