Mercurial > repos > IBBoard.WarFoundry.GUI.WinForms
diff FrmNewArmy.cs @ 176:0e39412353c4
Fixes #153: Default name for armies
* Merge back in to Trunk
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 08 Sep 2010 20:17:48 +0000 |
parents | 0e17097db8e5 |
children | 3a561c3751f5 d084446348f5 |
line wrap: on
line diff
--- a/FrmNewArmy.cs Mon Sep 06 18:17:19 2010 +0000 +++ b/FrmNewArmy.cs Wed Sep 08 20:17:48 2010 +0000 @@ -115,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"; @@ -127,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); @@ -138,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; @@ -160,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; @@ -180,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, @@ -213,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"; @@ -225,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); @@ -236,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); @@ -328,6 +328,8 @@ bool raceSelected = lstRaces.SelectedItem != null; txtArmyName.Enabled = raceSelected; armySize.Enabled = raceSelected; + race = (Race)lstRaces.SelectedItem; + txtArmyName.Text = String.Format(race.ArmyDefaultName, Translation.GetTranslation("armySizePts", "{0}pt", armySize.Value)); } private void gameSystems_SelectedValueChanged(object sender, EventArgs e)