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 diff
     1.1 --- a/FrmNewArmy.cs	Tue Sep 07 13:22:08 2010 +0000
     1.2 +++ b/FrmNewArmy.cs	Tue Sep 07 20:03:52 2010 +0000
     1.3 @@ -32,7 +32,6 @@
     1.4  		private ComboBox gameSystems;
     1.5  		private System.Windows.Forms.TextBox txtArmyName;
     1.6  
     1.7 -        private string defaultArmyName;
     1.8  		private GameSystem system;
     1.9  		private Race race;
    1.10  		private string armyName;
    1.11 @@ -116,9 +115,9 @@
    1.12  			this.gameSystemToolTip = new System.Windows.Forms.ToolTip(this.components);
    1.13  			((System.ComponentModel.ISupportInitialize)(this.armySize)).BeginInit();
    1.14  			this.SuspendLayout();
    1.15 -			// 
    1.16 +			//
    1.17  			// lstRaces
    1.18 -			// 
    1.19 +			//
    1.20  			this.lstRaces.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    1.21  						| System.Windows.Forms.AnchorStyles.Right)));
    1.22  			this.lstRaces.DisplayMember = "Name";
    1.23 @@ -128,9 +127,9 @@
    1.24  			this.lstRaces.Size = new System.Drawing.Size(265, 121);
    1.25  			this.lstRaces.TabIndex = 7;
    1.26  			this.lstRaces.SelectedIndexChanged += new System.EventHandler(this.lstRaces_SelectedIndexChanged);
    1.27 -			// 
    1.28 +			//
    1.29  			// bttnCancel
    1.30 -			// 
    1.31 +			//
    1.32  			this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
    1.33  			this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
    1.34  			this.bttnCancel.Location = new System.Drawing.Point(12, 231);
    1.35 @@ -139,18 +138,18 @@
    1.36  			this.bttnCancel.TabIndex = 6;
    1.37  			this.bttnCancel.Text = "cancel";
    1.38  			this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click);
    1.39 -			// 
    1.40 +			//
    1.41  			// lblRaceList
    1.42 -			// 
    1.43 +			//
    1.44  			this.lblRaceList.Location = new System.Drawing.Point(12, 33);
    1.45  			this.lblRaceList.Name = "lblRaceList";
    1.46  			this.lblRaceList.Size = new System.Drawing.Size(123, 80);
    1.47  			this.lblRaceList.TabIndex = 5;
    1.48  			this.lblRaceList.Text = "race list";
    1.49  			this.lblRaceList.TextAlign = System.Drawing.ContentAlignment.TopRight;
    1.50 -			// 
    1.51 +			//
    1.52  			// bttnSelectRace
    1.53 -			// 
    1.54 +			//
    1.55  			this.bttnSelectRace.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    1.56  						| System.Windows.Forms.AnchorStyles.Right)));
    1.57  			this.bttnSelectRace.Enabled = false;
    1.58 @@ -161,18 +160,18 @@
    1.59  			this.bttnSelectRace.TabIndex = 4;
    1.60  			this.bttnSelectRace.Text = "create army";
    1.61  			this.bttnSelectRace.Click += new System.EventHandler(this.bttnSelectRace_Click);
    1.62 -			// 
    1.63 +			//
    1.64  			// lblArmyName
    1.65 -			// 
    1.66 +			//
    1.67  			this.lblArmyName.Location = new System.Drawing.Point(12, 163);
    1.68  			this.lblArmyName.Name = "lblArmyName";
    1.69  			this.lblArmyName.Size = new System.Drawing.Size(123, 17);
    1.70  			this.lblArmyName.TabIndex = 8;
    1.71  			this.lblArmyName.Text = "army name";
    1.72  			this.lblArmyName.TextAlign = System.Drawing.ContentAlignment.TopRight;
    1.73 -			// 
    1.74 +			//
    1.75  			// txtArmyName
    1.76 -			// 
    1.77 +			//
    1.78  			this.txtArmyName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    1.79  						| System.Windows.Forms.AnchorStyles.Right)));
    1.80  			this.txtArmyName.Enabled = false;
    1.81 @@ -181,18 +180,18 @@
    1.82  			this.txtArmyName.Size = new System.Drawing.Size(265, 20);
    1.83  			this.txtArmyName.TabIndex = 9;
    1.84  			this.txtArmyName.TextChanged += new System.EventHandler(this.txtArmyName_TextChanged);
    1.85 -			// 
    1.86 +			//
    1.87  			// lblArmySize
    1.88 -			// 
    1.89 +			//
    1.90  			this.lblArmySize.Location = new System.Drawing.Point(12, 188);
    1.91  			this.lblArmySize.Name = "lblArmySize";
    1.92  			this.lblArmySize.Size = new System.Drawing.Size(123, 18);
    1.93  			this.lblArmySize.TabIndex = 10;
    1.94  			this.lblArmySize.Text = "army size";
    1.95  			this.lblArmySize.TextAlign = System.Drawing.ContentAlignment.TopRight;
    1.96 -			// 
    1.97 +			//
    1.98  			// armySize
    1.99 -			// 
   1.100 +			//
   1.101  			this.armySize.Enabled = false;
   1.102  			this.armySize.Increment = new decimal(new int[] {
   1.103              50,
   1.104 @@ -214,9 +213,9 @@
   1.105              0,
   1.106              0,
   1.107              0});
   1.108 -			// 
   1.109 +			//
   1.110  			// gameSystems
   1.111 -			// 
   1.112 +			//
   1.113  			this.gameSystems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
   1.114  						| System.Windows.Forms.AnchorStyles.Right)));
   1.115  			this.gameSystems.DisplayMember = "Name";
   1.116 @@ -226,9 +225,9 @@
   1.117  			this.gameSystems.Size = new System.Drawing.Size(265, 21);
   1.118  			this.gameSystems.TabIndex = 13;
   1.119  			this.gameSystems.SelectedValueChanged += new System.EventHandler(this.gameSystems_SelectedValueChanged);
   1.120 -			// 
   1.121 +			//
   1.122  			// lblGameSystem
   1.123 -			// 
   1.124 +			//
   1.125  			this.lblGameSystem.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.warning_sml;
   1.126  			this.lblGameSystem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
   1.127  			this.lblGameSystem.Location = new System.Drawing.Point(12, 9);
   1.128 @@ -237,9 +236,9 @@
   1.129  			this.lblGameSystem.TabIndex = 12;
   1.130  			this.lblGameSystem.Text = "game system";
   1.131  			this.lblGameSystem.TextAlign = System.Drawing.ContentAlignment.TopRight;
   1.132 -			// 
   1.133 +			//
   1.134  			// FrmNewArmy
   1.135 -			// 
   1.136 +			//
   1.137  			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
   1.138  			this.ClientSize = new System.Drawing.Size(418, 267);
   1.139  			this.Controls.Add(this.gameSystems);
   1.140 @@ -329,12 +328,8 @@
   1.141  			bool raceSelected = lstRaces.SelectedItem != null;
   1.142  			txtArmyName.Enabled = raceSelected;
   1.143  			armySize.Enabled = raceSelected;
   1.144 -            race = (Race)lstRaces.SelectedItem;
   1.145 -            //defaultArmyName = (string)WarFoundryLoader.GetDefault().GetRace(GetSelectedGameSystem(), race.ID).ArmyDefaultName;
   1.146 -            //System.Diagnostics.Debug.WriteLine(race.ArmyDefaultName +":FrmNewArmy");
   1.147 -            //defaultArmyName = (string) SelectedRace.Name;
   1.148 -            //defaultArmyName = (string) race.Name;
   1.149 -            txtArmyName.Text = race.Name + ArmySize  ;//ArmyDefaultName;
   1.150 +			race = (Race)lstRaces.SelectedItem;
   1.151 +			txtArmyName.Text = race.ArmyDefaultName;
   1.152  		}
   1.153  
   1.154  		private void gameSystems_SelectedValueChanged(object sender, EventArgs e)
     2.1 --- a/IBBoard.WarFoundry.GUI.WinForms.csproj	Tue Sep 07 13:22:08 2010 +0000
     2.2 +++ b/IBBoard.WarFoundry.GUI.WinForms.csproj	Tue Sep 07 20:03:52 2010 +0000
     2.3 @@ -1,7 +1,7 @@
     2.4  <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
     2.5    <PropertyGroup>
     2.6      <ProjectType>Local</ProjectType>
     2.7 -    <ProductVersion>9.0.30729</ProductVersion>
     2.8 +    <ProductVersion>8.0.50727</ProductVersion>
     2.9      <SchemaVersion>2.0</SchemaVersion>
    2.10      <ProjectGuid>{72C59D77-E2A4-401C-91F2-12728056D9A9}</ProjectGuid>
    2.11      <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    2.12 @@ -91,14 +91,6 @@
    2.13      <UseVSHostingProcess>true</UseVSHostingProcess>
    2.14    </PropertyGroup>
    2.15    <ItemGroup>
    2.16 -    <Reference Include="IBBoard, Version=1.0.3802.27003, Culture=neutral, processorArchitecture=MSIL">
    2.17 -      <SpecificVersion>False</SpecificVersion>
    2.18 -      <HintPath>..\IBBoard\bin\Release\IBBoard.dll</HintPath>
    2.19 -    </Reference>
    2.20 -    <Reference Include="IBBoard.WarFoundry.API, Version=0.0.1.41688, Culture=neutral, processorArchitecture=MSIL">
    2.21 -      <SpecificVersion>False</SpecificVersion>
    2.22 -      <HintPath>bin\Debug\IBBoard.WarFoundry.API.dll</HintPath>
    2.23 -    </Reference>
    2.24      <Reference Include="IBBoardWF, Version=1.0.0.27120, Culture=neutral, processorArchitecture=MSIL">
    2.25        <SpecificVersion>False</SpecificVersion>
    2.26        <HintPath>..\IBBoard.Windows.Forms\obj\Release\IBBoardWF.dll</HintPath>
    2.27 @@ -297,6 +289,16 @@
    2.28        <Install>true</Install>
    2.29      </BootstrapperPackage>
    2.30    </ItemGroup>
    2.31 +  <ItemGroup>
    2.32 +    <ProjectReference Include="..\IBBoard.WarFoundry.API\IBBoard.WarFoundry.API.csproj">
    2.33 +      <Project>{951E6C7A-7FBA-4F68-9D9E-F48618BB9626}</Project>
    2.34 +      <Name>IBBoard.WarFoundry.API</Name>
    2.35 +    </ProjectReference>
    2.36 +    <ProjectReference Include="..\IBBoard\IBBoard.csproj">
    2.37 +      <Project>{5DFD64F6-FC2B-4B4F-B92E-483BAC468105}</Project>
    2.38 +      <Name>IBBoard</Name>
    2.39 +    </ProjectReference>
    2.40 +  </ItemGroup>
    2.41    <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
    2.42    <PropertyGroup>
    2.43      <PreBuildEvent>