# HG changeset patch # User IBBoard # Date 1283889832 0 # Node ID b4e428dcfcb6a5ccd16f1c2b50140d7753d61e68 # Parent 6faadbbb7900ee0df3cd172633fb9cf419273754 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 diff -r 6faadbbb7900 -r b4e428dcfcb6 FrmNewArmy.cs --- 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) diff -r 6faadbbb7900 -r b4e428dcfcb6 IBBoard.WarFoundry.GUI.WinForms.csproj --- 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 @@  Local - 9.0.30729 + 8.0.50727 2.0 {72C59D77-E2A4-401C-91F2-12728056D9A9} Debug @@ -91,14 +91,6 @@ true - - False - ..\IBBoard\bin\Release\IBBoard.dll - - - False - bin\Debug\IBBoard.WarFoundry.API.dll - False ..\IBBoard.Windows.Forms\obj\Release\IBBoardWF.dll @@ -297,6 +289,16 @@ true + + + {951E6C7A-7FBA-4F68-9D9E-F48618BB9626} + IBBoard.WarFoundry.API + + + {5DFD64F6-FC2B-4B4F-B92E-483BAC468105} + IBBoard + +