# HG changeset patch # User IBBoard # Date 1304263273 0 # Node ID 10ba2c5340b2591eb9476a41e8a7181322930380 # Parent 15148d255e502ff6d5773d4d67bd49d66c8308cd Re #343: Show unit requirement failures * Rework existing dialog box to use new messages diff -r 15148d255e50 -r 10ba2c5340b2 FrmMain.cs --- a/FrmMain.cs Sun May 01 11:05:29 2011 +0000 +++ b/FrmMain.cs Sun May 01 15:21:13 2011 +0000 @@ -1221,15 +1221,16 @@ private void ValidateArmy() { - if (Validates.AsOkay(RequirementHandler.ValidateArmy(CurrentArmy))) + ICollection failureMessages; + if (Validates.AsOkay(RequirementHandler.ValidateArmy(CurrentArmy, out failureMessages))) { sbErrorPanel.Text = ""; sbErrorPanel.Tag = ""; } else { - sbErrorPanel.Text = "Validation errors exist"; - sbErrorPanel.Tag = "One or more army requirements have not been met"; + sbErrorPanel.Text = failureMessages.Count + " validation errors"; + sbErrorPanel.Tag = String.Join("\n", new List(failureMessages).ToArray()); } }