# HG changeset patch # User IBBoard # Date 1249157053 0 # Node ID cb3759c3ea19b0a21db3b9f821e040532fa7bca1 # Parent 110a7b0bcab5496e5e8b2dd800420c8ac6279ed2 * Code clean-up (line endings) no-open-ticket diff -r 110a7b0bcab5 -r cb3759c3ea19 api/Commands/CreateAndAddUnitCommand.cs --- a/api/Commands/CreateAndAddUnitCommand.cs Sat Aug 01 20:03:54 2009 +0000 +++ b/api/Commands/CreateAndAddUnitCommand.cs Sat Aug 01 20:04:13 2009 +0000 @@ -59,7 +59,7 @@ } public override void Undo() - { + { armyCat.RemoveUnit(addedUnit); } diff -r 110a7b0bcab5 -r cb3759c3ea19 api/Objects/Army.cs --- a/api/Objects/Army.cs Sat Aug 01 20:03:54 2009 +0000 +++ b/api/Objects/Army.cs Sat Aug 01 20:04:13 2009 +0000 @@ -98,16 +98,16 @@ protected void OnUnitAdded(Unit unit) { OnUnitAdded(unit, null); - } - - protected void OnUnitAdded(Unit unit, List failedReqs) - { - if (UnitAdded != null) - { - UnitAdded(unit); - } - - OnFailedRequirement(failedReqs); + } + + protected void OnUnitAdded(Unit unit, List failedReqs) + { + if (UnitAdded != null) + { + UnitAdded(unit); + } + + OnFailedRequirement(failedReqs); } protected void OnUnitRemoved(Unit unit) @@ -120,17 +120,17 @@ if (UnitRemoved!=null) { UnitRemoved(unit); - } - + } + OnFailedRequirement(failedReqs); - } - - protected void OnFailedRequirement(List failedReqs) - { - if (FailedRequirement != null && failedReqs != null && failedReqs.Count > 0) - { - FailedRequirement(failedReqs); - } + } + + protected void OnFailedRequirement(List failedReqs) + { + if (FailedRequirement != null && failedReqs != null && failedReqs.Count > 0) + { + FailedRequirement(failedReqs); + } } private void OnPointsValueChanged(double oldValue, double newValue) @@ -256,16 +256,16 @@ private void Army_UnitAdded(WarFoundryObject val) { OnUnitAdded((Unit)val); - } - + } + private void Army_UnitRemoved(WarFoundryObject val) { OnUnitRemoved((Unit)val); - } - - private void Army_FailedRequirement(List val) - { - OnFailedRequirement(val); + } + + private void Army_FailedRequirement(List val) + { + OnFailedRequirement(val); } } } diff -r 110a7b0bcab5 -r cb3759c3ea19 api/Objects/ArmyCategory.cs --- a/api/Objects/ArmyCategory.cs Sat Aug 01 20:03:54 2009 +0000 +++ b/api/Objects/ArmyCategory.cs Sat Aug 01 20:04:13 2009 +0000 @@ -21,7 +21,7 @@ private DoubleValChangedDelegate PointsValueChangedMethod; public event DoubleValChangedDelegate PointsValueChanged; public event ObjectAddDelegate UnitAdded; - public event ObjectRemoveDelegate UnitRemoved; + public event ObjectRemoveDelegate UnitRemoved; public event FailedUnitRequirementDelegate FailedRequirement; public ArmyCategory(Army army, Category cat) : base() @@ -124,43 +124,43 @@ { double diff = newVal - oldVal; TotalPoints+= diff; - } - } - - protected void OnUnitAdded(Unit unit) - { - OnUnitAdded(unit, null); - } - - protected void OnUnitAdded(Unit unit, List failedReqs) - { - if (UnitAdded != null) - { - UnitAdded(unit); - } - - if (FailedRequirement != null && failedReqs != null && failedReqs.Count > 0) - { - FailedRequirement(failedReqs); - } - } - - protected void OnUnitRemoved(Unit unit) - { - OnUnitRemoved(unit, null); - } - - protected void OnUnitRemoved(Unit unit, List failedReqs) - { - if (UnitRemoved != null) - { - UnitRemoved(unit); - } - - if (FailedRequirement != null && failedReqs != null && failedReqs.Count > 0) - { - FailedRequirement(failedReqs); - } + } + } + + protected void OnUnitAdded(Unit unit) + { + OnUnitAdded(unit, null); + } + + protected void OnUnitAdded(Unit unit, List failedReqs) + { + if (UnitAdded != null) + { + UnitAdded(unit); + } + + if (FailedRequirement != null && failedReqs != null && failedReqs.Count > 0) + { + FailedRequirement(failedReqs); + } + } + + protected void OnUnitRemoved(Unit unit) + { + OnUnitRemoved(unit, null); + } + + protected void OnUnitRemoved(Unit unit, List failedReqs) + { + if (UnitRemoved != null) + { + UnitRemoved(unit); + } + + if (FailedRequirement != null && failedReqs != null && failedReqs.Count > 0) + { + FailedRequirement(failedReqs); + } } protected virtual void OnPointsValueChanged(double oldValue, double newValue)