changeset 54:d6ff354a5d84

Re #166: Move game system changing to part of army creation * Initial commit - code works but naming isn't correct * Remove system selection dialog * Add game system selection to FrmNewArmy * Populate race list based on game system selected * Always enable "New Army" button/menu item
author IBBoard <dev@ibboard.co.uk>
date Sat, 19 Sep 2009 10:27:01 +0000
parents e6d0d9eababf
children 346b4ac34997
files FrmMain.cs FrmNewArmy.cs FrmNewArmy.resx FrmSelectSystem.cs FrmSelectSystem.resources FrmSelectSystem.resx IBBoard.WarFoundry.GUI.WinForms.csproj
diffstat 7 files changed, 254 insertions(+), 598 deletions(-) [+]
line diff
     1.1 --- a/FrmMain.cs	Wed Sep 16 19:50:39 2009 +0000
     1.2 +++ b/FrmMain.cs	Sat Sep 19 10:27:01 2009 +0000
     1.3 @@ -70,8 +70,6 @@
     1.4  		private IBBoard.Windows.Forms.IBBMenuItem miSaveArmy;
     1.5  		private IBBoard.Windows.Forms.IBBMenuItem miSaveArmyAs;
     1.6  		private System.Windows.Forms.MenuItem miSep2;
     1.7 -		private IBBoard.Windows.Forms.IBBMenuItem miChangeSystem;
     1.8 -		private System.Windows.Forms.MenuItem miSep1;
     1.9  		private IBBoard.Windows.Forms.IBBMenuItem miReloadFiles;
    1.10  		private System.Windows.Forms.MenuItem miSep3;
    1.11  		private IBBoard.Windows.Forms.IBBMenuItem miExit;
    1.12 @@ -228,8 +226,6 @@
    1.13  			this.miExportArmyAs = new System.Windows.Forms.MenuItem();
    1.14  			this.miExportArmyAsBasicHTML = new System.Windows.Forms.MenuItem();
    1.15  			this.miCloseArmy = new IBBoard.Windows.Forms.IBBMenuItem();
    1.16 -			this.miSep1 = new System.Windows.Forms.MenuItem();
    1.17 -			this.miChangeSystem = new IBBoard.Windows.Forms.IBBMenuItem();
    1.18  			this.miSep2 = new System.Windows.Forms.MenuItem();
    1.19  			this.miReloadFiles = new IBBoard.Windows.Forms.IBBMenuItem();
    1.20  			this.miSep3 = new System.Windows.Forms.MenuItem();
    1.21 @@ -287,7 +283,6 @@
    1.22  			// 
    1.23  			// toolBar
    1.24  			// 
    1.25 -			this.toolBar.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
    1.26  			this.toolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
    1.27              this.bttnNewArmy,
    1.28              this.bttnOpenArmy,
    1.29 @@ -307,7 +302,6 @@
    1.30  			// 
    1.31  			// bttnNewArmy
    1.32  			// 
    1.33 -			this.bttnNewArmy.Enabled = false;
    1.34  			this.bttnNewArmy.ImageIndex = 0;
    1.35  			this.bttnNewArmy.Name = "bttnNewArmy";
    1.36  			// 
    1.37 @@ -372,8 +366,6 @@
    1.38              this.miSaveArmyAs,
    1.39              this.miExportArmyAs,
    1.40              this.miCloseArmy,
    1.41 -            this.miSep1,
    1.42 -            this.miChangeSystem,
    1.43              this.miSep2,
    1.44              this.miReloadFiles,
    1.45              this.miSep3,
    1.46 @@ -382,7 +374,6 @@
    1.47  			// 
    1.48  			// miNewArmy
    1.49  			// 
    1.50 -			this.miNewArmy.Enabled = false;
    1.51  			this.miNewArmy.Index = 0;
    1.52  			this.miNewArmy.Text = "&new army";
    1.53  			this.miNewArmy.Click += new System.EventHandler(this.miNewArmy_Click);
    1.54 @@ -428,36 +419,25 @@
    1.55  			this.miCloseArmy.Text = "&close army";
    1.56  			this.miCloseArmy.Click += new System.EventHandler(this.miCloseArmy_Click);
    1.57  			// 
    1.58 -			// miSep1
    1.59 -			// 
    1.60 -			this.miSep1.Index = 6;
    1.61 -			this.miSep1.Text = "-";
    1.62 -			// 
    1.63 -			// miChangeSystem
    1.64 -			// 
    1.65 -			this.miChangeSystem.Index = 7;
    1.66 -			this.miChangeSystem.Text = "change &game system";
    1.67 -			this.miChangeSystem.Click += new System.EventHandler(this.miChangeSystem_Click);
    1.68 -			// 
    1.69  			// miSep2
    1.70  			// 
    1.71 -			this.miSep2.Index = 8;
    1.72 +			this.miSep2.Index = 6;
    1.73  			this.miSep2.Text = "-";
    1.74  			// 
    1.75  			// miReloadFiles
    1.76  			// 
    1.77 -			this.miReloadFiles.Index = 9;
    1.78 +			this.miReloadFiles.Index = 7;
    1.79  			this.miReloadFiles.Text = "&reload files";
    1.80  			this.miReloadFiles.Click += new System.EventHandler(this.miReloadFiles_Click);
    1.81  			// 
    1.82  			// miSep3
    1.83  			// 
    1.84 -			this.miSep3.Index = 10;
    1.85 +			this.miSep3.Index = 8;
    1.86  			this.miSep3.Text = "-";
    1.87  			// 
    1.88  			// miExit
    1.89  			// 
    1.90 -			this.miExit.Index = 11;
    1.91 +			this.miExit.Index = 9;
    1.92  			this.miExit.Text = "e&xit";
    1.93  			this.miExit.Click += new System.EventHandler(this.miExit_Click);
    1.94  			// 
    1.95 @@ -795,39 +775,20 @@
    1.96  			}
    1.97  		}
    1.98  
    1.99 -		private GameSystem CurrentGameSystem
   1.100 +		public static GameSystem CurrentGameSystem
   1.101  		{
   1.102  			get { return WarFoundryCore.CurrentGameSystem; }
   1.103  			set { WarFoundryCore.CurrentGameSystem = value; }
   1.104  		}
   1.105  
   1.106 -		private static Army CurrentArmy
   1.107 +		public static Army CurrentArmy
   1.108  		{
   1.109  			get { return WarFoundryCore.CurrentArmy; }
   1.110  			set { WarFoundryCore.CurrentArmy = value; }
   1.111  		}
   1.112  
   1.113 -		private void SelectGameSystem()
   1.114 -		{
   1.115 -			FrmSelectSystem selectSystem = new FrmSelectSystem();
   1.116 -			DialogResult dr = selectSystem.ShowDialog(this);
   1.117 -
   1.118 -			if (dr==DialogResult.OK)
   1.119 -			{
   1.120 -				CloseCurrentArmy();
   1.121 -				CurrentGameSystem = selectSystem.GameSystem;
   1.122 -			}
   1.123 -		}
   1.124 -
   1.125 -		private void miChangeSystem_Click(object sender, System.EventArgs e)
   1.126 -		{
   1.127 -			SelectGameSystem();
   1.128 -		}
   1.129 -
   1.130  		private void FrmMain_GameSystemChanged(GameSystem oldSystem, GameSystem newSystem)
   1.131  		{
   1.132 -			miNewArmy.Enabled = newSystem != null;
   1.133 -			bttnNewArmy.Enabled = newSystem != null;
   1.134  			SetAppTitle();
   1.135  			RemoveCategoryButtons();
   1.136  			AddCategoryButtons();
   1.137 @@ -1252,7 +1213,7 @@
   1.138  
   1.139  			if (dr == DialogResult.OK)
   1.140  			{
   1.141 -				Army army = WarFoundryCore.CurrentArmy;
   1.142 +				Army army = CurrentArmy;
   1.143  				string filePath = dialog.FileName;
   1.144  				logger.DebugFormat("Exporting {0} to {1} as basic HTML", army.Name, filePath);
   1.145  				WarFoundryHtmlExporter.GetDefault().ExportArmy(army, filePath);
     2.1 --- a/FrmNewArmy.cs	Wed Sep 16 19:50:39 2009 +0000
     2.2 +++ b/FrmNewArmy.cs	Sat Sep 19 10:27:01 2009 +0000
     2.3 @@ -11,9 +11,9 @@
     2.4  using IBBoard.Windows.Forms;
     2.5  using IBBoard.WarFoundry.API;
     2.6  using IBBoard.WarFoundry.API.Objects;
     2.7 -using IBBoard.Windows.Forms.I18N;
     2.8 -
     2.9 -namespace IBBoard.WarFoundry
    2.10 +using IBBoard.Windows.Forms.I18N;
    2.11 +
    2.12 +namespace IBBoard.WarFoundry.GUI.WinForms
    2.13  {
    2.14  	/// <summary>
    2.15  	/// Summary description for FrmNewArmy.
    2.16 @@ -28,24 +28,41 @@
    2.17  		private IBBoard.Windows.Forms.IBBLabel lblRaceList;
    2.18  		private IBBoard.Windows.Forms.IBBButton bttnSelectRace;
    2.19  		private System.Windows.Forms.ListBox lstRaces;
    2.20 -		private Race[] races;
    2.21  		private IBBoard.Windows.Forms.IBBLabel lblArmyName;
    2.22  		private IBBoard.Windows.Forms.IBBLabel lblArmySize;
    2.23 -		private System.Windows.Forms.NumericUpDown armySize;
    2.24 -		private System.Windows.Forms.TextBox txtArmyName;
    2.25 +		private System.Windows.Forms.NumericUpDown armySize;
    2.26 +		private Label lblGameSystem;
    2.27 +		private ComboBox gameSystems;
    2.28 +		private System.Windows.Forms.TextBox txtArmyName;
    2.29 +
    2.30 +		private GameSystem system;
    2.31 +		private Race race;
    2.32 +		private string armyName;
    2.33 +		private int maxPoints;
    2.34  
    2.35  		public FrmNewArmy(GameSystem system)
    2.36  		{
    2.37  			InitializeComponent();
    2.38  
    2.39 -			ControlTranslator.TranslateControl(this);
    2.40 -
    2.41 -            races = WarFoundryLoader.GetDefault().GetRaces(system);
    2.42 -			
    2.43 -			for (int i = 0; i<races.Length; i++)
    2.44 -			{
    2.45 -				lstRaces.Items.Add(races[i].Name);
    2.46 +			ControlTranslator.TranslateControl(this);
    2.47 +
    2.48 +			foreach (GameSystem gameSystem in WarFoundryLoader.GetDefault().GetGameSystems())
    2.49 +			{
    2.50 +				gameSystems.Items.Add(gameSystem);
    2.51 +			}
    2.52 +
    2.53 +			if (WarFoundryCore.CurrentGameSystem != null)
    2.54 +			{
    2.55 +				gameSystems.SelectedItem = FrmMain.CurrentGameSystem;
    2.56  			}
    2.57 +		}
    2.58 +
    2.59 +		private void SetRaces(GameSystem system)
    2.60 +		{
    2.61 +			foreach (Race race in WarFoundryLoader.GetDefault().GetRaces(system))
    2.62 +			{
    2.63 +				lstRaces.Items.Add(race);
    2.64 +			}
    2.65  		}
    2.66  
    2.67  		/// <summary>
    2.68 @@ -69,148 +86,176 @@
    2.69  		/// the contents of this method with the code editor.
    2.70  		/// </summary>
    2.71  		private void InitializeComponent()
    2.72 -		{
    2.73 -			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FrmNewArmy));
    2.74 -			this.lstRaces = new System.Windows.Forms.ListBox();
    2.75 -			this.bttnCancel = new IBBoard.Windows.Forms.IBBButton();
    2.76 -			this.lblRaceList = new IBBoard.Windows.Forms.IBBLabel();
    2.77 -			this.bttnSelectRace = new IBBoard.Windows.Forms.IBBButton();
    2.78 -			this.lblArmyName = new IBBoard.Windows.Forms.IBBLabel();
    2.79 -			this.txtArmyName = new System.Windows.Forms.TextBox();
    2.80 -			this.lblArmySize = new IBBoard.Windows.Forms.IBBLabel();
    2.81 -			this.armySize = new System.Windows.Forms.NumericUpDown();
    2.82 -			((System.ComponentModel.ISupportInitialize)(this.armySize)).BeginInit();
    2.83 -			this.SuspendLayout();
    2.84 -			// 
    2.85 -			// lstRaces
    2.86 -			// 
    2.87 -			this.lstRaces.Location = new System.Drawing.Point(88, 8);
    2.88 -			this.lstRaces.Name = "lstRaces";
    2.89 -			this.lstRaces.Size = new System.Drawing.Size(272, 121);
    2.90 -			this.lstRaces.TabIndex = 7;
    2.91 -			this.lstRaces.SelectedIndexChanged += new System.EventHandler(this.lstRaces_SelectedIndexChanged);
    2.92 -			// 
    2.93 -			// bttnCancel
    2.94 -			// 
    2.95 -			this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
    2.96 -			this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
    2.97 -			this.bttnCancel.Location = new System.Drawing.Point(8, 200);
    2.98 -			this.bttnCancel.Name = "bttnCancel";
    2.99 -			this.bttnCancel.Size = new System.Drawing.Size(80, 24);
   2.100 -			this.bttnCancel.TabIndex = 6;
   2.101 -			this.bttnCancel.Text = "Cancel";
   2.102 -			this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click);
   2.103 -			// 
   2.104 -			// lblRaceList
   2.105 -			// 
   2.106 -			this.lblRaceList.Location = new System.Drawing.Point(0, 8);
   2.107 -			this.lblRaceList.Name = "lblRaceList";
   2.108 -			this.lblRaceList.Size = new System.Drawing.Size(88, 80);
   2.109 -			this.lblRaceList.TabIndex = 5;
   2.110 -			this.lblRaceList.Text = "race list";
   2.111 -			this.lblRaceList.TextAlign = System.Drawing.ContentAlignment.TopRight;
   2.112 -			// 
   2.113 -			// bttnSelectRace
   2.114 -			// 
   2.115 -			this.bttnSelectRace.Enabled = false;
   2.116 -			this.bttnSelectRace.FlatStyle = System.Windows.Forms.FlatStyle.System;
   2.117 -			this.bttnSelectRace.Location = new System.Drawing.Point(256, 200);
   2.118 -			this.bttnSelectRace.Name = "bttnSelectRace";
   2.119 -			this.bttnSelectRace.Size = new System.Drawing.Size(104, 24);
   2.120 -			this.bttnSelectRace.TabIndex = 4;
   2.121 -			this.bttnSelectRace.Text = "create race";
   2.122 -			this.bttnSelectRace.Click += new System.EventHandler(this.bttnSelectRace_Click);
   2.123 -			// 
   2.124 -			// lblArmyName
   2.125 -			// 
   2.126 -			this.lblArmyName.Location = new System.Drawing.Point(0, 136);
   2.127 -			this.lblArmyName.Name = "lblArmyName";
   2.128 -			this.lblArmyName.Size = new System.Drawing.Size(88, 32);
   2.129 -			this.lblArmyName.TabIndex = 8;
   2.130 -			this.lblArmyName.Text = "army name";
   2.131 -			this.lblArmyName.TextAlign = System.Drawing.ContentAlignment.TopRight;
   2.132 -			// 
   2.133 -			// txtArmyName
   2.134 -			// 
   2.135 -			this.txtArmyName.Location = new System.Drawing.Point(88, 136);
   2.136 -			this.txtArmyName.Name = "txtArmyName";
   2.137 -			this.txtArmyName.Size = new System.Drawing.Size(272, 20);
   2.138 -			this.txtArmyName.TabIndex = 9;
   2.139 -			this.txtArmyName.Text = "";
   2.140 -			this.txtArmyName.TextChanged += new System.EventHandler(this.txtArmyName_TextChanged);
   2.141 -			// 
   2.142 -			// lblArmySize
   2.143 -			// 
   2.144 -			this.lblArmySize.Location = new System.Drawing.Point(0, 168);
   2.145 -			this.lblArmySize.Name = "lblArmySize";
   2.146 -			this.lblArmySize.Size = new System.Drawing.Size(88, 32);
   2.147 -			this.lblArmySize.TabIndex = 10;
   2.148 -			this.lblArmySize.Text = "army size";
   2.149 -			this.lblArmySize.TextAlign = System.Drawing.ContentAlignment.TopRight;
   2.150 -			// 
   2.151 -			// armySize
   2.152 -			// 
   2.153 -			this.armySize.Increment = new System.Decimal(new int[] {
   2.154 -																	   50,
   2.155 -																	   0,
   2.156 -																	   0,
   2.157 -																	   0});
   2.158 -			this.armySize.Location = new System.Drawing.Point(88, 168);
   2.159 -			this.armySize.Maximum = new System.Decimal(new int[] {
   2.160 -																	 1000000,
   2.161 -																	 0,
   2.162 -																	 0,
   2.163 -																	 0});
   2.164 -			this.armySize.Name = "armySize";
   2.165 -			this.armySize.TabIndex = 11;
   2.166 -			this.armySize.ThousandsSeparator = true;
   2.167 -			this.armySize.Value = new System.Decimal(new int[] {
   2.168 -																   2000,
   2.169 -																   0,
   2.170 -																   0,
   2.171 -																   0});
   2.172 -			// 
   2.173 -			// FrmNewArmy
   2.174 -			// 
   2.175 -			this.AcceptButton = this.bttnSelectRace;
   2.176 -			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
   2.177 -			this.CancelButton = this.bttnCancel;
   2.178 -			this.ClientSize = new System.Drawing.Size(370, 228);
   2.179 -			this.Controls.Add(this.armySize);
   2.180 -			this.Controls.Add(this.lblArmySize);
   2.181 -			this.Controls.Add(this.txtArmyName);
   2.182 -			this.Controls.Add(this.lblArmyName);
   2.183 -			this.Controls.Add(this.bttnCancel);
   2.184 -			this.Controls.Add(this.lblRaceList);
   2.185 -			this.Controls.Add(this.bttnSelectRace);
   2.186 -			this.Controls.Add(this.lstRaces);
   2.187 -			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
   2.188 -			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
   2.189 -			this.MaximizeBox = false;
   2.190 -			this.MinimizeBox = false;
   2.191 -			this.Name = "FrmNewArmy";
   2.192 -			this.ShowInTaskbar = false;
   2.193 -			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
   2.194 -			this.Text = "FrmNewArmy";
   2.195 -			((System.ComponentModel.ISupportInitialize)(this.armySize)).EndInit();
   2.196 -			this.ResumeLayout(false);
   2.197 -
   2.198 +		{
   2.199 +			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmNewArmy));
   2.200 +			this.lstRaces = new System.Windows.Forms.ListBox();
   2.201 +			this.bttnCancel = new IBBoard.Windows.Forms.IBBButton();
   2.202 +			this.lblRaceList = new IBBoard.Windows.Forms.IBBLabel();
   2.203 +			this.bttnSelectRace = new IBBoard.Windows.Forms.IBBButton();
   2.204 +			this.lblArmyName = new IBBoard.Windows.Forms.IBBLabel();
   2.205 +			this.txtArmyName = new System.Windows.Forms.TextBox();
   2.206 +			this.lblArmySize = new IBBoard.Windows.Forms.IBBLabel();
   2.207 +			this.armySize = new System.Windows.Forms.NumericUpDown();
   2.208 +			this.lblGameSystem = new System.Windows.Forms.Label();
   2.209 +			this.gameSystems = new System.Windows.Forms.ComboBox();
   2.210 +			((System.ComponentModel.ISupportInitialize) (this.armySize)).BeginInit();
   2.211 +			this.SuspendLayout();
   2.212 +			// 
   2.213 +			// lstRaces
   2.214 +			// 
   2.215 +			this.lstRaces.Location = new System.Drawing.Point(89, 33);
   2.216 +			this.lstRaces.Name = "lstRaces";
   2.217 +			this.lstRaces.Size = new System.Drawing.Size(269, 121);
   2.218 +			this.lstRaces.TabIndex = 7;
   2.219 +			this.lstRaces.SelectedIndexChanged += new System.EventHandler(this.lstRaces_SelectedIndexChanged);
   2.220 +			// 
   2.221 +			// bttnCancel
   2.222 +			// 
   2.223 +			this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
   2.224 +			this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
   2.225 +			this.bttnCancel.Location = new System.Drawing.Point(12, 231);
   2.226 +			this.bttnCancel.Name = "bttnCancel";
   2.227 +			this.bttnCancel.Size = new System.Drawing.Size(80, 24);
   2.228 +			this.bttnCancel.TabIndex = 6;
   2.229 +			this.bttnCancel.Text = "Cancel";
   2.230 +			this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click);
   2.231 +			// 
   2.232 +			// lblRaceList
   2.233 +			// 
   2.234 +			this.lblRaceList.Location = new System.Drawing.Point(12, 33);
   2.235 +			this.lblRaceList.Name = "lblRaceList";
   2.236 +			this.lblRaceList.Size = new System.Drawing.Size(71, 80);
   2.237 +			this.lblRaceList.TabIndex = 5;
   2.238 +			this.lblRaceList.Text = "race list";
   2.239 +			this.lblRaceList.TextAlign = System.Drawing.ContentAlignment.TopRight;
   2.240 +			// 
   2.241 +			// bttnSelectRace
   2.242 +			// 
   2.243 +			this.bttnSelectRace.Enabled = false;
   2.244 +			this.bttnSelectRace.FlatStyle = System.Windows.Forms.FlatStyle.System;
   2.245 +			this.bttnSelectRace.Location = new System.Drawing.Point(254, 231);
   2.246 +			this.bttnSelectRace.Name = "bttnSelectRace";
   2.247 +			this.bttnSelectRace.Size = new System.Drawing.Size(104, 24);
   2.248 +			this.bttnSelectRace.TabIndex = 4;
   2.249 +			this.bttnSelectRace.Text = "create race";
   2.250 +			this.bttnSelectRace.Click += new System.EventHandler(this.bttnSelectRace_Click);
   2.251 +			// 
   2.252 +			// lblArmyName
   2.253 +			// 
   2.254 +			this.lblArmyName.Location = new System.Drawing.Point(12, 163);
   2.255 +			this.lblArmyName.Name = "lblArmyName";
   2.256 +			this.lblArmyName.Size = new System.Drawing.Size(71, 17);
   2.257 +			this.lblArmyName.TabIndex = 8;
   2.258 +			this.lblArmyName.Text = "army name";
   2.259 +			this.lblArmyName.TextAlign = System.Drawing.ContentAlignment.TopRight;
   2.260 +			// 
   2.261 +			// txtArmyName
   2.262 +			// 
   2.263 +			this.txtArmyName.Location = new System.Drawing.Point(89, 160);
   2.264 +			this.txtArmyName.Name = "txtArmyName";
   2.265 +			this.txtArmyName.Size = new System.Drawing.Size(269, 20);
   2.266 +			this.txtArmyName.TabIndex = 9;
   2.267 +			this.txtArmyName.TextChanged += new System.EventHandler(this.txtArmyName_TextChanged);
   2.268 +			// 
   2.269 +			// lblArmySize
   2.270 +			// 
   2.271 +			this.lblArmySize.Location = new System.Drawing.Point(12, 188);
   2.272 +			this.lblArmySize.Name = "lblArmySize";
   2.273 +			this.lblArmySize.Size = new System.Drawing.Size(71, 18);
   2.274 +			this.lblArmySize.TabIndex = 10;
   2.275 +			this.lblArmySize.Text = "army size";
   2.276 +			this.lblArmySize.TextAlign = System.Drawing.ContentAlignment.TopRight;
   2.277 +			// 
   2.278 +			// armySize
   2.279 +			// 
   2.280 +			this.armySize.Increment = new decimal(new int[] {
   2.281 +            50,
   2.282 +            0,
   2.283 +            0,
   2.284 +            0});
   2.285 +			this.armySize.Location = new System.Drawing.Point(89, 186);
   2.286 +			this.armySize.Maximum = new decimal(new int[] {
   2.287 +            1000000,
   2.288 +            0,
   2.289 +            0,
   2.290 +            0});
   2.291 +			this.armySize.Name = "armySize";
   2.292 +			this.armySize.Size = new System.Drawing.Size(120, 20);
   2.293 +			this.armySize.TabIndex = 11;
   2.294 +			this.armySize.ThousandsSeparator = true;
   2.295 +			this.armySize.Value = new decimal(new int[] {
   2.296 +            2000,
   2.297 +            0,
   2.298 +            0,
   2.299 +            0});
   2.300 +			// 
   2.301 +			// lblGameSystem
   2.302 +			// 
   2.303 +			this.lblGameSystem.Location = new System.Drawing.Point(12, 9);
   2.304 +			this.lblGameSystem.Name = "lblGameSystem";
   2.305 +			this.lblGameSystem.Size = new System.Drawing.Size(71, 18);
   2.306 +			this.lblGameSystem.TabIndex = 12;
   2.307 +			this.lblGameSystem.Text = "game system";
   2.308 +			this.lblGameSystem.TextAlign = System.Drawing.ContentAlignment.TopRight;
   2.309 +			// 
   2.310 +			// gameSystems
   2.311 +			// 
   2.312 +			this.gameSystems.FormattingEnabled = true;
   2.313 +			this.gameSystems.Location = new System.Drawing.Point(89, 6);
   2.314 +			this.gameSystems.Name = "gameSystems";
   2.315 +			this.gameSystems.Size = new System.Drawing.Size(269, 21);
   2.316 +			this.gameSystems.TabIndex = 13;
   2.317 +			this.gameSystems.SelectedValueChanged += new System.EventHandler(this.gameSystems_SelectedValueChanged);
   2.318 +			// 
   2.319 +			// FrmNewArmy
   2.320 +			// 
   2.321 +			this.AcceptButton = this.bttnSelectRace;
   2.322 +			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
   2.323 +			this.CancelButton = this.bttnCancel;
   2.324 +			this.ClientSize = new System.Drawing.Size(370, 267);
   2.325 +			this.Controls.Add(this.gameSystems);
   2.326 +			this.Controls.Add(this.lblGameSystem);
   2.327 +			this.Controls.Add(this.armySize);
   2.328 +			this.Controls.Add(this.lblArmySize);
   2.329 +			this.Controls.Add(this.txtArmyName);
   2.330 +			this.Controls.Add(this.lblArmyName);
   2.331 +			this.Controls.Add(this.bttnCancel);
   2.332 +			this.Controls.Add(this.lblRaceList);
   2.333 +			this.Controls.Add(this.bttnSelectRace);
   2.334 +			this.Controls.Add(this.lstRaces);
   2.335 +			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
   2.336 +			this.Icon = ((System.Drawing.Icon) (resources.GetObject("$this.Icon")));
   2.337 +			this.MaximizeBox = false;
   2.338 +			this.MinimizeBox = false;
   2.339 +			this.Name = "FrmNewArmy";
   2.340 +			this.ShowInTaskbar = false;
   2.341 +			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
   2.342 +			this.Text = "FrmNewArmy";
   2.343 +			((System.ComponentModel.ISupportInitialize) (this.armySize)).EndInit();
   2.344 +			this.ResumeLayout(false);
   2.345 +			this.PerformLayout();
   2.346 +
   2.347  		}
   2.348 -		#endregion
   2.349 +		#endregion
   2.350 +
   2.351 +		public GameSystem SelectedSystem
   2.352 +		{
   2.353 +			get { return system; }
   2.354 +		}
   2.355  
   2.356  		public Race SelectedRace
   2.357  		{
   2.358 -			get { return races[lstRaces.SelectedIndex]; }
   2.359 +			get { return race; }
   2.360  		}
   2.361  
   2.362  		public string ArmyName
   2.363  		{
   2.364 -			get { return txtArmyName.Text; }
   2.365 +			get { return armyName; }
   2.366  		}
   2.367  
   2.368  		public int ArmySize
   2.369  		{
   2.370 -			get { return (int)armySize.Value; }
   2.371 +			get { return maxPoints; }
   2.372  		}
   2.373  
   2.374  		private void bttnCancel_Click(object sender, System.EventArgs e)
   2.375 @@ -221,8 +266,22 @@
   2.376  
   2.377  		private void bttnSelectRace_Click(object sender, System.EventArgs e)
   2.378  		{
   2.379 -			DialogResult = DialogResult.OK;
   2.380 +			DialogResult = DialogResult.OK;
   2.381 +			SetValues();
   2.382  			this.Close();
   2.383 +		}
   2.384 +
   2.385 +		private void SetValues()
   2.386 +		{
   2.387 +			system = GetSelectedGameSystem();
   2.388 +			race = (Race) lstRaces.SelectedItem;
   2.389 +			armyName = txtArmyName.Text;
   2.390 +			maxPoints = (int) armySize.Value;
   2.391 +		}
   2.392 +
   2.393 +		private GameSystem GetSelectedGameSystem()
   2.394 +		{
   2.395 +			return (GameSystem) gameSystems.SelectedItem;
   2.396  		}
   2.397  
   2.398  		private void txtArmyName_TextChanged(object sender, System.EventArgs e)
   2.399 @@ -238,6 +297,17 @@
   2.400  		private void lstRaces_SelectedIndexChanged(object sender, System.EventArgs e)
   2.401  		{
   2.402  			setSelectRaceEnabledVal();
   2.403 +		}
   2.404 +
   2.405 +		private void gameSystems_SelectedValueChanged(object sender, EventArgs e)
   2.406 +		{
   2.407 +			GameSystem selected = GetSelectedGameSystem();
   2.408 +			lstRaces.Items.Clear();
   2.409 +
   2.410 +			if (selected != null)
   2.411 +			{
   2.412 +				SetRaces(selected);
   2.413 +			}
   2.414  		}
   2.415  	}
   2.416  }
     3.1 --- a/FrmNewArmy.resx	Wed Sep 16 19:50:39 2009 +0000
     3.2 +++ b/FrmNewArmy.resx	Sat Sep 19 10:27:01 2009 +0000
     3.3 @@ -3,7 +3,7 @@
     3.4    <!-- 
     3.5      Microsoft ResX Schema 
     3.6      
     3.7 -    Version 1.3
     3.8 +    Version 2.0
     3.9      
    3.10      The primary goals of this format is to allow a simple XML format 
    3.11      that is mostly human readable. The generation and parsing of the 
    3.12 @@ -14,16 +14,17 @@
    3.13      
    3.14      ... ado.net/XML headers & schema ...
    3.15      <resheader name="resmimetype">text/microsoft-resx</resheader>
    3.16 -    <resheader name="version">1.3</resheader>
    3.17 +    <resheader name="version">2.0</resheader>
    3.18      <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    3.19      <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    3.20 -    <data name="Name1">this is my long string</data>
    3.21 +    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    3.22      <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    3.23      <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
    3.24 -        [base64 mime encoded serialized .NET Framework object]
    3.25 +        <value>[base64 mime encoded serialized .NET Framework object]</value>
    3.26      </data>
    3.27      <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    3.28 -        [base64 mime encoded string representing a byte array form of the .NET Framework object]
    3.29 +        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
    3.30 +        <comment>This is a comment</comment>
    3.31      </data>
    3.32                  
    3.33      There are any number of "resheader" rows that contain simple 
    3.34 @@ -35,7 +36,7 @@
    3.35      Classes that don't support this are serialized and stored with the 
    3.36      mimetype set.
    3.37      
    3.38 -    The mimetype is used forserialized objects, and tells the 
    3.39 +    The mimetype is used for serialized objects, and tells the 
    3.40      ResXResourceReader how to depersist the object. This is currently not 
    3.41      extensible. For a given mimetype the value must be set accordingly:
    3.42      
    3.43 @@ -45,7 +46,7 @@
    3.44      
    3.45      mimetype: application/x-microsoft.net.object.binary.base64
    3.46      value   : The object must be serialized with 
    3.47 -            : System.Serialization.Formatters.Binary.BinaryFormatter
    3.48 +            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
    3.49              : and then encoded with base64 encoding.
    3.50      
    3.51      mimetype: application/x-microsoft.net.object.soap.base64
    3.52 @@ -59,18 +60,37 @@
    3.53              : and then encoded with base64 encoding.
    3.54      -->
    3.55    <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    3.56 +    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    3.57      <xsd:element name="root" msdata:IsDataSet="true">
    3.58        <xsd:complexType>
    3.59          <xsd:choice maxOccurs="unbounded">
    3.60 +          <xsd:element name="metadata">
    3.61 +            <xsd:complexType>
    3.62 +              <xsd:sequence>
    3.63 +                <xsd:element name="value" type="xsd:string" minOccurs="0" />
    3.64 +              </xsd:sequence>
    3.65 +              <xsd:attribute name="name" use="required" type="xsd:string" />
    3.66 +              <xsd:attribute name="type" type="xsd:string" />
    3.67 +              <xsd:attribute name="mimetype" type="xsd:string" />
    3.68 +              <xsd:attribute ref="xml:space" />
    3.69 +            </xsd:complexType>
    3.70 +          </xsd:element>
    3.71 +          <xsd:element name="assembly">
    3.72 +            <xsd:complexType>
    3.73 +              <xsd:attribute name="alias" type="xsd:string" />
    3.74 +              <xsd:attribute name="name" type="xsd:string" />
    3.75 +            </xsd:complexType>
    3.76 +          </xsd:element>
    3.77            <xsd:element name="data">
    3.78              <xsd:complexType>
    3.79                <xsd:sequence>
    3.80                  <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
    3.81                  <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
    3.82                </xsd:sequence>
    3.83 -              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
    3.84 +              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
    3.85                <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
    3.86                <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
    3.87 +              <xsd:attribute ref="xml:space" />
    3.88              </xsd:complexType>
    3.89            </xsd:element>
    3.90            <xsd:element name="resheader">
    3.91 @@ -89,117 +109,16 @@
    3.92      <value>text/microsoft-resx</value>
    3.93    </resheader>
    3.94    <resheader name="version">
    3.95 -    <value>1.3</value>
    3.96 +    <value>2.0</value>
    3.97    </resheader>
    3.98    <resheader name="reader">
    3.99 -    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   3.100 +    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   3.101    </resheader>
   3.102    <resheader name="writer">
   3.103 -    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   3.104 +    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   3.105    </resheader>
   3.106 -  <data name="lstRaces.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.107 -    <value>Private</value>
   3.108 -  </data>
   3.109 -  <data name="lstRaces.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.110 -    <value>False</value>
   3.111 -  </data>
   3.112 -  <data name="lstRaces.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.113 -    <value>Private</value>
   3.114 -  </data>
   3.115 -  <data name="bttnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.116 -    <value>False</value>
   3.117 -  </data>
   3.118 -  <data name="bttnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.119 -    <value>Private</value>
   3.120 -  </data>
   3.121 -  <data name="bttnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.122 -    <value>Private</value>
   3.123 -  </data>
   3.124 -  <data name="lblRaceList.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.125 -    <value>False</value>
   3.126 -  </data>
   3.127 -  <data name="lblRaceList.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.128 -    <value>Private</value>
   3.129 -  </data>
   3.130 -  <data name="lblRaceList.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.131 -    <value>Private</value>
   3.132 -  </data>
   3.133 -  <data name="bttnSelectRace.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.134 -    <value>False</value>
   3.135 -  </data>
   3.136 -  <data name="bttnSelectRace.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.137 -    <value>Private</value>
   3.138 -  </data>
   3.139 -  <data name="bttnSelectRace.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.140 -    <value>Private</value>
   3.141 -  </data>
   3.142 -  <data name="lblArmyName.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.143 -    <value>False</value>
   3.144 -  </data>
   3.145 -  <data name="lblArmyName.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.146 -    <value>Private</value>
   3.147 -  </data>
   3.148 -  <data name="lblArmyName.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.149 -    <value>Private</value>
   3.150 -  </data>
   3.151 -  <data name="txtArmyName.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.152 -    <value>Private</value>
   3.153 -  </data>
   3.154 -  <data name="txtArmyName.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.155 -    <value>False</value>
   3.156 -  </data>
   3.157 -  <data name="txtArmyName.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.158 -    <value>Private</value>
   3.159 -  </data>
   3.160 -  <data name="lblArmySize.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.161 -    <value>False</value>
   3.162 -  </data>
   3.163 -  <data name="lblArmySize.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.164 -    <value>Private</value>
   3.165 -  </data>
   3.166 -  <data name="lblArmySize.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.167 -    <value>Private</value>
   3.168 -  </data>
   3.169 -  <data name="armySize.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.170 -    <value>False</value>
   3.171 -  </data>
   3.172 -  <data name="armySize.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.173 -    <value>Private</value>
   3.174 -  </data>
   3.175 -  <data name="armySize.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.176 -    <value>Private</value>
   3.177 -  </data>
   3.178 -  <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.179 -    <value>False</value>
   3.180 -  </data>
   3.181 -  <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.182 -    <value>(Default)</value>
   3.183 -  </data>
   3.184 -  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.185 -    <value>False</value>
   3.186 -  </data>
   3.187 -  <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.188 -    <value>False</value>
   3.189 -  </data>
   3.190 -  <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
   3.191 -    <value>8, 8</value>
   3.192 -  </data>
   3.193 -  <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.194 -    <value>True</value>
   3.195 -  </data>
   3.196 -  <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.197 -    <value>80</value>
   3.198 -  </data>
   3.199 -  <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.200 -    <value>True</value>
   3.201 -  </data>
   3.202 -  <data name="$this.Name">
   3.203 -    <value>FrmNewArmy</value>
   3.204 -  </data>
   3.205 -  <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   3.206 -    <value>Private</value>
   3.207 -  </data>
   3.208 -  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
   3.209 +  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   3.210 +  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
   3.211      <value>
   3.212          AAABAAQAEBAAAAEAIABoBAAARgAAABgYAAABACAAiAkAAK4EAAAgIAAAAQAgAKgQAAA2DgAAMDAAAAEA
   3.213          IACoJQAA3h4AACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
     4.1 --- a/FrmSelectSystem.cs	Wed Sep 16 19:50:39 2009 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,167 +0,0 @@
     4.4 -// This file (FrmSelectSystem.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard.
     4.5 -//
     4.6 -// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
     4.7 -
     4.8 -using System;
     4.9 -using System.IO;
    4.10 -using System.Drawing;
    4.11 -using System.ComponentModel;
    4.12 -using System.Windows.Forms;
    4.13 -using IBBoard;
    4.14 -using IBBoard.Lang;
    4.15 -using IBBoard.WarFoundry.API;
    4.16 -using IBBoard.Windows.Forms;
    4.17 -using IBBoard.WarFoundry.API.Objects;
    4.18 -using IBBoard.Windows.Forms.I18N;
    4.19 -
    4.20 -namespace IBBoard.WarFoundry
    4.21 -{
    4.22 -	/// <summary>
    4.23 -	/// Summary description for FrmSelectSystem.
    4.24 -	/// </summary>
    4.25 -	public class FrmSelectSystem : IBBoard.Windows.Forms.IBBForm
    4.26 -	{
    4.27 -		private System.Windows.Forms.ListBox lstSystems;
    4.28 -		private IBBoard.Windows.Forms.IBBLabel lblSystemList;
    4.29 -		/// <summary>
    4.30 -		/// Required designer variable.
    4.31 -		/// </summary>
    4.32 -		private System.ComponentModel.Container components = null;
    4.33 -		private IBBoard.Windows.Forms.IBBButton bttnCancel;
    4.34 -		private IBBoard.Windows.Forms.IBBButton bttnSelectSystem;
    4.35 -		private GameSystem selectedSystem;
    4.36 -
    4.37 -
    4.38 -        public FrmSelectSystem()
    4.39 -		{
    4.40 -			//
    4.41 -			// Required for Windows Form Designer support
    4.42 -			//
    4.43 -			InitializeComponent();
    4.44 -
    4.45 -            ControlTranslator.TranslateControl(this);
    4.46 -
    4.47 -			lstSystems.Items.Clear();
    4.48 -            GameSystem[] systems = WarFoundryLoader.GetDefault().GetGameSystems();
    4.49 -            lstSystems.DataSource = systems;
    4.50 -			lstSystems.DisplayMember = "Name";
    4.51 -		}
    4.52 -
    4.53 -		/// <summary>
    4.54 -		/// Clean up any resources being used.
    4.55 -		/// </summary>
    4.56 -		protected override void Dispose( bool disposing )
    4.57 -		{
    4.58 -			if( disposing )
    4.59 -			{
    4.60 -				if(components != null)
    4.61 -				{
    4.62 -					components.Dispose();
    4.63 -				}
    4.64 -			}
    4.65 -			base.Dispose( disposing );
    4.66 -		}
    4.67 -
    4.68 -		#region Windows Form Designer generated code
    4.69 -		/// <summary>
    4.70 -		/// Required method for Designer support - do not modify
    4.71 -		/// the contents of this method with the code editor.
    4.72 -		/// </summary>
    4.73 -		private void InitializeComponent()
    4.74 -		{
    4.75 -			this.lstSystems = new System.Windows.Forms.ListBox();
    4.76 -			this.bttnSelectSystem = new IBBoard.Windows.Forms.IBBButton();
    4.77 -			this.lblSystemList = new IBBoard.Windows.Forms.IBBLabel();
    4.78 -			this.bttnCancel = new IBBoard.Windows.Forms.IBBButton();
    4.79 -			this.SuspendLayout();
    4.80 -			// 
    4.81 -			// lstSystems
    4.82 -			// 
    4.83 -			this.lstSystems.Location = new System.Drawing.Point(80, 8);
    4.84 -			this.lstSystems.Name = "lstSystems";
    4.85 -			this.lstSystems.Size = new System.Drawing.Size(216, 95);
    4.86 -			this.lstSystems.TabIndex = 0;
    4.87 -			this.lstSystems.DoubleClick += new System.EventHandler(this.lstSystems_DoubleClick);
    4.88 -			this.lstSystems.SelectedIndexChanged += new System.EventHandler(this.lstSystems_SelectedIndexChanged);
    4.89 -			// 
    4.90 -			// bttnSelectSystem
    4.91 -			// 
    4.92 -			this.bttnSelectSystem.Enabled = false;
    4.93 -			this.bttnSelectSystem.FlatStyle = System.Windows.Forms.FlatStyle.System;
    4.94 -			this.bttnSelectSystem.Location = new System.Drawing.Point(192, 112);
    4.95 -			this.bttnSelectSystem.Name = "bttnSelectSystem";
    4.96 -			this.bttnSelectSystem.Size = new System.Drawing.Size(104, 24);
    4.97 -			this.bttnSelectSystem.TabIndex = 1;
    4.98 -			this.bttnSelectSystem.Text = "Select system";
    4.99 -			this.bttnSelectSystem.Click += new System.EventHandler(this.bttnSelectSystem_Click);
   4.100 -			// 
   4.101 -			// lblSystemList
   4.102 -			// 
   4.103 -			this.lblSystemList.Location = new System.Drawing.Point(0, 8);
   4.104 -			this.lblSystemList.Name = "lblSystemList";
   4.105 -			this.lblSystemList.Size = new System.Drawing.Size(80, 80);
   4.106 -			this.lblSystemList.TabIndex = 2;
   4.107 -			this.lblSystemList.Text = "system list";
   4.108 -			this.lblSystemList.TextAlign = System.Drawing.ContentAlignment.TopRight;
   4.109 -			// 
   4.110 -			// bttnCancel
   4.111 -			// 
   4.112 -			this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
   4.113 -			this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
   4.114 -			this.bttnCancel.Location = new System.Drawing.Point(8, 112);
   4.115 -			this.bttnCancel.Name = "bttnCancel";
   4.116 -			this.bttnCancel.Size = new System.Drawing.Size(80, 24);
   4.117 -			this.bttnCancel.TabIndex = 3;
   4.118 -			this.bttnCancel.Text = "Cancel";
   4.119 -			this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click);
   4.120 -			// 
   4.121 -			// FrmSelectSystem
   4.122 -			// 
   4.123 -			this.AcceptButton = this.bttnSelectSystem;
   4.124 -			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
   4.125 -			this.CancelButton = this.bttnCancel;
   4.126 -			this.ClientSize = new System.Drawing.Size(306, 142);
   4.127 -			this.ControlBox = false;
   4.128 -			this.Controls.Add(this.bttnCancel);
   4.129 -			this.Controls.Add(this.lblSystemList);
   4.130 -			this.Controls.Add(this.bttnSelectSystem);
   4.131 -			this.Controls.Add(this.lstSystems);
   4.132 -			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
   4.133 -			this.Name = "FrmSelectSystem";
   4.134 -			this.ShowInTaskbar = false;
   4.135 -			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
   4.136 -			this.Text = "FrmSelectSystem";
   4.137 -			this.ResumeLayout(false);
   4.138 -
   4.139 -		}
   4.140 -		#endregion
   4.141 -
   4.142 -		private void lstSystems_SelectedIndexChanged(object sender, System.EventArgs e)
   4.143 -		{
   4.144 -			bttnSelectSystem.Enabled = (lstSystems.SelectedIndex>-1);
   4.145 -		}
   4.146 -
   4.147 -		private void bttnSelectSystem_Click(object sender, System.EventArgs e)
   4.148 -		{
   4.149 -            selectedSystem = (GameSystem) lstSystems.SelectedItem;
   4.150 -            this.DialogResult = DialogResult.OK;
   4.151 -			this.Close();
   4.152 -		}
   4.153 -
   4.154 -		private void bttnCancel_Click(object sender, System.EventArgs e)
   4.155 -		{
   4.156 -			this.DialogResult = DialogResult.Cancel;
   4.157 -			this.Close();
   4.158 -		}
   4.159 -
   4.160 -		public GameSystem GameSystem
   4.161 -		{
   4.162 -			get { return selectedSystem; }
   4.163 -		}
   4.164 -
   4.165 -		private void lstSystems_DoubleClick(object sender, EventArgs e)
   4.166 -		{
   4.167 -			bttnSelectSystem_Click(null, null);
   4.168 -		}
   4.169 -	}
   4.170 -}
     5.1 Binary file FrmSelectSystem.resources has changed
     6.1 --- a/FrmSelectSystem.resx	Wed Sep 16 19:50:39 2009 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,120 +0,0 @@
     6.4 -<?xml version="1.0" encoding="utf-8"?>
     6.5 -<root>
     6.6 -  <!-- 
     6.7 -    Microsoft ResX Schema 
     6.8 -    
     6.9 -    Version 2.0
    6.10 -    
    6.11 -    The primary goals of this format is to allow a simple XML format 
    6.12 -    that is mostly human readable. The generation and parsing of the 
    6.13 -    various data types are done through the TypeConverter classes 
    6.14 -    associated with the data types.
    6.15 -    
    6.16 -    Example:
    6.17 -    
    6.18 -    ... ado.net/XML headers & schema ...
    6.19 -    <resheader name="resmimetype">text/microsoft-resx</resheader>
    6.20 -    <resheader name="version">2.0</resheader>
    6.21 -    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    6.22 -    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    6.23 -    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    6.24 -    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    6.25 -    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
    6.26 -        <value>[base64 mime encoded serialized .NET Framework object]</value>
    6.27 -    </data>
    6.28 -    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    6.29 -        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
    6.30 -        <comment>This is a comment</comment>
    6.31 -    </data>
    6.32 -                
    6.33 -    There are any number of "resheader" rows that contain simple 
    6.34 -    name/value pairs.
    6.35 -    
    6.36 -    Each data row contains a name, and value. The row also contains a 
    6.37 -    type or mimetype. Type corresponds to a .NET class that support 
    6.38 -    text/value conversion through the TypeConverter architecture. 
    6.39 -    Classes that don't support this are serialized and stored with the 
    6.40 -    mimetype set.
    6.41 -    
    6.42 -    The mimetype is used for serialized objects, and tells the 
    6.43 -    ResXResourceReader how to depersist the object. This is currently not 
    6.44 -    extensible. For a given mimetype the value must be set accordingly:
    6.45 -    
    6.46 -    Note - application/x-microsoft.net.object.binary.base64 is the format 
    6.47 -    that the ResXResourceWriter will generate, however the reader can 
    6.48 -    read any of the formats listed below.
    6.49 -    
    6.50 -    mimetype: application/x-microsoft.net.object.binary.base64
    6.51 -    value   : The object must be serialized with 
    6.52 -            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
    6.53 -            : and then encoded with base64 encoding.
    6.54 -    
    6.55 -    mimetype: application/x-microsoft.net.object.soap.base64
    6.56 -    value   : The object must be serialized with 
    6.57 -            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
    6.58 -            : and then encoded with base64 encoding.
    6.59 -
    6.60 -    mimetype: application/x-microsoft.net.object.bytearray.base64
    6.61 -    value   : The object must be serialized into a byte array 
    6.62 -            : using a System.ComponentModel.TypeConverter
    6.63 -            : and then encoded with base64 encoding.
    6.64 -    -->
    6.65 -  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    6.66 -    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    6.67 -    <xsd:element name="root" msdata:IsDataSet="true">
    6.68 -      <xsd:complexType>
    6.69 -        <xsd:choice maxOccurs="unbounded">
    6.70 -          <xsd:element name="metadata">
    6.71 -            <xsd:complexType>
    6.72 -              <xsd:sequence>
    6.73 -                <xsd:element name="value" type="xsd:string" minOccurs="0" />
    6.74 -              </xsd:sequence>
    6.75 -              <xsd:attribute name="name" use="required" type="xsd:string" />
    6.76 -              <xsd:attribute name="type" type="xsd:string" />
    6.77 -              <xsd:attribute name="mimetype" type="xsd:string" />
    6.78 -              <xsd:attribute ref="xml:space" />
    6.79 -            </xsd:complexType>
    6.80 -          </xsd:element>
    6.81 -          <xsd:element name="assembly">
    6.82 -            <xsd:complexType>
    6.83 -              <xsd:attribute name="alias" type="xsd:string" />
    6.84 -              <xsd:attribute name="name" type="xsd:string" />
    6.85 -            </xsd:complexType>
    6.86 -          </xsd:element>
    6.87 -          <xsd:element name="data">
    6.88 -            <xsd:complexType>
    6.89 -              <xsd:sequence>
    6.90 -                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
    6.91 -                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
    6.92 -              </xsd:sequence>
    6.93 -              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
    6.94 -              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
    6.95 -              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
    6.96 -              <xsd:attribute ref="xml:space" />
    6.97 -            </xsd:complexType>
    6.98 -          </xsd:element>
    6.99 -          <xsd:element name="resheader">
   6.100 -            <xsd:complexType>
   6.101 -              <xsd:sequence>
   6.102 -                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
   6.103 -              </xsd:sequence>
   6.104 -              <xsd:attribute name="name" type="xsd:string" use="required" />
   6.105 -            </xsd:complexType>
   6.106 -          </xsd:element>
   6.107 -        </xsd:choice>
   6.108 -      </xsd:complexType>
   6.109 -    </xsd:element>
   6.110 -  </xsd:schema>
   6.111 -  <resheader name="resmimetype">
   6.112 -    <value>text/microsoft-resx</value>
   6.113 -  </resheader>
   6.114 -  <resheader name="version">
   6.115 -    <value>2.0</value>
   6.116 -  </resheader>
   6.117 -  <resheader name="reader">
   6.118 -    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   6.119 -  </resheader>
   6.120 -  <resheader name="writer">
   6.121 -    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   6.122 -  </resheader>
   6.123 -</root>
   6.124 \ No newline at end of file
     7.1 --- a/IBBoard.WarFoundry.GUI.WinForms.csproj	Wed Sep 16 19:50:39 2009 +0000
     7.2 +++ b/IBBoard.WarFoundry.GUI.WinForms.csproj	Sat Sep 19 10:27:01 2009 +0000
     7.3 @@ -136,9 +136,6 @@
     7.4      <Compile Include="FrmReplaceUnitEquipment.cs">
     7.5        <SubType>Form</SubType>
     7.6      </Compile>
     7.7 -    <Compile Include="FrmSelectSystem.cs">
     7.8 -      <SubType>Form</SubType>
     7.9 -    </Compile>
    7.10      <Compile Include="FrmUnit.cs">
    7.11        <SubType>Form</SubType>
    7.12      </Compile>
    7.13 @@ -174,10 +171,6 @@
    7.14      <EmbeddedResource Include="FrmReplaceUnitEquipment.resx">
    7.15        <DependentUpon>FrmReplaceUnitEquipment.cs</DependentUpon>
    7.16      </EmbeddedResource>
    7.17 -    <EmbeddedResource Include="FrmSelectSystem.resx">
    7.18 -      <DependentUpon>FrmSelectSystem.cs</DependentUpon>
    7.19 -      <SubType>Designer</SubType>
    7.20 -    </EmbeddedResource>
    7.21      <EmbeddedResource Include="FrmUnit.resx">
    7.22        <DependentUpon>FrmUnit.cs</DependentUpon>
    7.23      </EmbeddedResource>