changeset 203:b4e428dcfcb6 default-army-name

Re #153: Default name for armies * Have a fight between VS.Net versions over how to reference projects (may need to update from 2K3 but still target .Net 2) * Use property of race object and clean up comments
author IBBoard <dev@ibboard.co.uk>
date Tue, 07 Sep 2010 20:03:52 +0000
parents 6faadbbb7900
children 9d17b4674f6e
files FrmNewArmy.cs IBBoard.WarFoundry.GUI.WinForms.csproj
diffstat 2 files changed, 35 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/FrmNewArmy.cs	Tue Sep 07 13:22:08 2010 +0000
+++ b/FrmNewArmy.cs	Tue Sep 07 20:03:52 2010 +0000
@@ -32,7 +32,6 @@
 		private ComboBox gameSystems;
 		private System.Windows.Forms.TextBox txtArmyName;
 
-        private string defaultArmyName;
 		private GameSystem system;
 		private Race race;
 		private string armyName;
@@ -116,9 +115,9 @@
 			this.gameSystemToolTip = new System.Windows.Forms.ToolTip(this.components);
 			((System.ComponentModel.ISupportInitialize)(this.armySize)).BeginInit();
 			this.SuspendLayout();
-			// 
+			//
 			// lstRaces
-			// 
+			//
 			this.lstRaces.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
 						| System.Windows.Forms.AnchorStyles.Right)));
 			this.lstRaces.DisplayMember = "Name";
@@ -128,9 +127,9 @@
 			this.lstRaces.Size = new System.Drawing.Size(265, 121);
 			this.lstRaces.TabIndex = 7;
 			this.lstRaces.SelectedIndexChanged += new System.EventHandler(this.lstRaces_SelectedIndexChanged);
-			// 
+			//
 			// bttnCancel
-			// 
+			//
 			this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
 			this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
 			this.bttnCancel.Location = new System.Drawing.Point(12, 231);
@@ -139,18 +138,18 @@
 			this.bttnCancel.TabIndex = 6;
 			this.bttnCancel.Text = "cancel";
 			this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click);
-			// 
+			//
 			// lblRaceList
-			// 
+			//
 			this.lblRaceList.Location = new System.Drawing.Point(12, 33);
 			this.lblRaceList.Name = "lblRaceList";
 			this.lblRaceList.Size = new System.Drawing.Size(123, 80);
 			this.lblRaceList.TabIndex = 5;
 			this.lblRaceList.Text = "race list";
 			this.lblRaceList.TextAlign = System.Drawing.ContentAlignment.TopRight;
-			// 
+			//
 			// bttnSelectRace
-			// 
+			//
 			this.bttnSelectRace.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
 						| System.Windows.Forms.AnchorStyles.Right)));
 			this.bttnSelectRace.Enabled = false;
@@ -161,18 +160,18 @@
 			this.bttnSelectRace.TabIndex = 4;
 			this.bttnSelectRace.Text = "create army";
 			this.bttnSelectRace.Click += new System.EventHandler(this.bttnSelectRace_Click);
-			// 
+			//
 			// lblArmyName
-			// 
+			//
 			this.lblArmyName.Location = new System.Drawing.Point(12, 163);
 			this.lblArmyName.Name = "lblArmyName";
 			this.lblArmyName.Size = new System.Drawing.Size(123, 17);
 			this.lblArmyName.TabIndex = 8;
 			this.lblArmyName.Text = "army name";
 			this.lblArmyName.TextAlign = System.Drawing.ContentAlignment.TopRight;
-			// 
+			//
 			// txtArmyName
-			// 
+			//
 			this.txtArmyName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
 						| System.Windows.Forms.AnchorStyles.Right)));
 			this.txtArmyName.Enabled = false;
@@ -181,18 +180,18 @@
 			this.txtArmyName.Size = new System.Drawing.Size(265, 20);
 			this.txtArmyName.TabIndex = 9;
 			this.txtArmyName.TextChanged += new System.EventHandler(this.txtArmyName_TextChanged);
-			// 
+			//
 			// lblArmySize
-			// 
+			//
 			this.lblArmySize.Location = new System.Drawing.Point(12, 188);
 			this.lblArmySize.Name = "lblArmySize";
 			this.lblArmySize.Size = new System.Drawing.Size(123, 18);
 			this.lblArmySize.TabIndex = 10;
 			this.lblArmySize.Text = "army size";
 			this.lblArmySize.TextAlign = System.Drawing.ContentAlignment.TopRight;
-			// 
+			//
 			// armySize
-			// 
+			//
 			this.armySize.Enabled = false;
 			this.armySize.Increment = new decimal(new int[] {
             50,
@@ -214,9 +213,9 @@
             0,
             0,
             0});
-			// 
+			//
 			// gameSystems
-			// 
+			//
 			this.gameSystems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
 						| System.Windows.Forms.AnchorStyles.Right)));
 			this.gameSystems.DisplayMember = "Name";
@@ -226,9 +225,9 @@
 			this.gameSystems.Size = new System.Drawing.Size(265, 21);
 			this.gameSystems.TabIndex = 13;
 			this.gameSystems.SelectedValueChanged += new System.EventHandler(this.gameSystems_SelectedValueChanged);
-			// 
+			//
 			// lblGameSystem
-			// 
+			//
 			this.lblGameSystem.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.warning_sml;
 			this.lblGameSystem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
 			this.lblGameSystem.Location = new System.Drawing.Point(12, 9);
@@ -237,9 +236,9 @@
 			this.lblGameSystem.TabIndex = 12;
 			this.lblGameSystem.Text = "game system";
 			this.lblGameSystem.TextAlign = System.Drawing.ContentAlignment.TopRight;
-			// 
+			//
 			// FrmNewArmy
-			// 
+			//
 			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
 			this.ClientSize = new System.Drawing.Size(418, 267);
 			this.Controls.Add(this.gameSystems);
@@ -329,12 +328,8 @@
 			bool raceSelected = lstRaces.SelectedItem != null;
 			txtArmyName.Enabled = raceSelected;
 			armySize.Enabled = raceSelected;
-            race = (Race)lstRaces.SelectedItem;
-            //defaultArmyName = (string)WarFoundryLoader.GetDefault().GetRace(GetSelectedGameSystem(), race.ID).ArmyDefaultName;
-            //System.Diagnostics.Debug.WriteLine(race.ArmyDefaultName +":FrmNewArmy");
-            //defaultArmyName = (string) SelectedRace.Name;
-            //defaultArmyName = (string) race.Name;
-            txtArmyName.Text = race.Name + ArmySize  ;//ArmyDefaultName;
+			race = (Race)lstRaces.SelectedItem;
+			txtArmyName.Text = race.ArmyDefaultName;
 		}
 
 		private void gameSystems_SelectedValueChanged(object sender, EventArgs e)
--- a/IBBoard.WarFoundry.GUI.WinForms.csproj	Tue Sep 07 13:22:08 2010 +0000
+++ b/IBBoard.WarFoundry.GUI.WinForms.csproj	Tue Sep 07 20:03:52 2010 +0000
@@ -1,7 +1,7 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
   <PropertyGroup>
     <ProjectType>Local</ProjectType>
-    <ProductVersion>9.0.30729</ProductVersion>
+    <ProductVersion>8.0.50727</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{72C59D77-E2A4-401C-91F2-12728056D9A9}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -91,14 +91,6 @@
     <UseVSHostingProcess>true</UseVSHostingProcess>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="IBBoard, Version=1.0.3802.27003, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\IBBoard\bin\Release\IBBoard.dll</HintPath>
-    </Reference>
-    <Reference Include="IBBoard.WarFoundry.API, Version=0.0.1.41688, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>bin\Debug\IBBoard.WarFoundry.API.dll</HintPath>
-    </Reference>
     <Reference Include="IBBoardWF, Version=1.0.0.27120, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\IBBoard.Windows.Forms\obj\Release\IBBoardWF.dll</HintPath>
@@ -297,6 +289,16 @@
       <Install>true</Install>
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\IBBoard.WarFoundry.API\IBBoard.WarFoundry.API.csproj">
+      <Project>{951E6C7A-7FBA-4F68-9D9E-F48618BB9626}</Project>
+      <Name>IBBoard.WarFoundry.API</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\IBBoard\IBBoard.csproj">
+      <Project>{5DFD64F6-FC2B-4B4F-B92E-483BAC468105}</Project>
+      <Name>IBBoard</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
     <PreBuildEvent>