changeset 100:88b5a0da73f2

Re #88: Complete initial WinForms UI * Auto-select game system if there is only one to reduce user clicks * Auto-select first race to reduce user clicks (especially when they only have one race)
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Nov 2009 20:17:10 +0000
parents acaea18ac0a1
children 3e78af88ceb3
files FrmNewArmy.cs
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/FrmNewArmy.cs	Sat Nov 21 16:41:28 2009 +0000
+++ b/FrmNewArmy.cs	Sat Nov 21 20:17:10 2009 +0000
@@ -55,6 +55,10 @@
 			{
 				gameSystems.SelectedItem = FrmMain.CurrentGameSystem;
 			}
+			else if (gameSystems.Items.Count == 1)
+			{
+				gameSystems.SelectedIndex = 0;
+			}
 		}
 
 		private void SetRaces(GameSystem system)
@@ -309,6 +313,11 @@
 			if (selected != null)
 			{
 				SetRaces(selected);
+
+				if (lstRaces.Items.Count > 0)
+				{
+					lstRaces.SelectedIndex = 0;
+				}
 			}
 		}
 	}