Mercurial > repos > IBBoard.WarFoundry.GUI.WinForms
annotate FrmNewArmy.cs @ 106:3fae39208d06
Fixes #179: Make sure that translations are used throughout UI
* Translate tooltip for "total points" panel
* Add translation for tooltip to English file
* Change some default messages to default capitalisation and sensible values
Also:
* Bump version to v0.1b6pre (looks like v0.1b5 is still showing itself as v0.1b4!)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 28 Nov 2009 16:29:03 +0000 |
parents | 88b5a0da73f2 |
children | 39b93ca5fb9c |
rev | line source |
---|---|
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
1 // This file (FrmNewArmy.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard. |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
2 // |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
3 // 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. |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
4 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
5 using System; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
6 using System.Drawing; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
7 using System.ComponentModel; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
8 using System.Windows.Forms; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
9 using IBBoard; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
10 using IBBoard.Lang; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
11 using IBBoard.Windows.Forms; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
12 using IBBoard.WarFoundry.API; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
13 using IBBoard.WarFoundry.API.Objects; |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
14 using IBBoard.Windows.Forms.I18N; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
15 |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
16 namespace IBBoard.WarFoundry.GUI.WinForms |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
17 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
18 /// <summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
19 /// Summary description for FrmNewArmy. |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
20 /// </summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
21 public class FrmNewArmy : IBBForm |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
22 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
23 /// <summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
24 /// Required designer variable. |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
25 /// </summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
26 private System.ComponentModel.Container components = null; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
27 private IBBoard.Windows.Forms.IBBButton bttnCancel; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
28 private IBBoard.Windows.Forms.IBBLabel lblRaceList; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
29 private IBBoard.Windows.Forms.IBBButton bttnSelectRace; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
30 private System.Windows.Forms.ListBox lstRaces; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
31 private IBBoard.Windows.Forms.IBBLabel lblArmyName; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
32 private IBBoard.Windows.Forms.IBBLabel lblArmySize; |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
33 private System.Windows.Forms.NumericUpDown armySize; |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
34 private IBBLabel lblGameSystem; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
35 private ComboBox gameSystems; |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
36 private System.Windows.Forms.TextBox txtArmyName; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
37 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
38 private GameSystem system; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
39 private Race race; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
40 private string armyName; |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
41 private int maxPoints; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
42 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
43 public FrmNewArmy(GameSystem system) |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
44 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
45 InitializeComponent(); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
46 |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
47 ControlTranslator.TranslateControl(this); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
48 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
49 foreach (GameSystem gameSystem in WarFoundryLoader.GetDefault().GetGameSystems()) |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
50 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
51 gameSystems.Items.Add(gameSystem); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
52 } |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
53 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
54 if (WarFoundryCore.CurrentGameSystem != null) |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
55 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
56 gameSystems.SelectedItem = FrmMain.CurrentGameSystem; |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
57 } |
100
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
58 else if (gameSystems.Items.Count == 1) |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
59 { |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
60 gameSystems.SelectedIndex = 0; |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
61 } |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
62 } |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
63 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
64 private void SetRaces(GameSystem system) |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
65 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
66 foreach (Race race in WarFoundryLoader.GetDefault().GetRaces(system)) |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
67 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
68 lstRaces.Items.Add(race); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
69 } |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
70 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
71 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
72 /// <summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
73 /// Clean up any resources being used. |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
74 /// </summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
75 protected override void Dispose( bool disposing ) |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
76 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
77 if( disposing ) |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
78 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
79 if(components != null) |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
80 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
81 components.Dispose(); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
82 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
83 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
84 base.Dispose( disposing ); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
85 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
86 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
87 #region Windows Form Designer generated code |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
88 /// <summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
89 /// Required method for Designer support - do not modify |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
90 /// the contents of this method with the code editor. |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
91 /// </summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
92 private void InitializeComponent() |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
93 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
94 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmNewArmy)); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
95 this.lstRaces = new System.Windows.Forms.ListBox(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
96 this.bttnCancel = new IBBoard.Windows.Forms.IBBButton(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
97 this.lblRaceList = new IBBoard.Windows.Forms.IBBLabel(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
98 this.bttnSelectRace = new IBBoard.Windows.Forms.IBBButton(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
99 this.lblArmyName = new IBBoard.Windows.Forms.IBBLabel(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
100 this.txtArmyName = new System.Windows.Forms.TextBox(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
101 this.lblArmySize = new IBBoard.Windows.Forms.IBBLabel(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
102 this.armySize = new System.Windows.Forms.NumericUpDown(); |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
103 this.lblGameSystem = new IBBoard.Windows.Forms.IBBLabel(); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
104 this.gameSystems = new System.Windows.Forms.ComboBox(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
105 ((System.ComponentModel.ISupportInitialize) (this.armySize)).BeginInit(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
106 this.SuspendLayout(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
107 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
108 // lstRaces |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
109 // |
56
11e81ba85684
Fixes #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
54
diff
changeset
|
110 this.lstRaces.DisplayMember = "Name"; |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
111 this.lstRaces.Location = new System.Drawing.Point(110, 33); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
112 this.lstRaces.Name = "lstRaces"; |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
113 this.lstRaces.Size = new System.Drawing.Size(248, 121); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
114 this.lstRaces.TabIndex = 7; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
115 this.lstRaces.SelectedIndexChanged += new System.EventHandler(this.lstRaces_SelectedIndexChanged); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
116 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
117 // bttnCancel |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
118 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
119 this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
120 this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
121 this.bttnCancel.Location = new System.Drawing.Point(12, 231); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
122 this.bttnCancel.Name = "bttnCancel"; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
123 this.bttnCancel.Size = new System.Drawing.Size(80, 24); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
124 this.bttnCancel.TabIndex = 6; |
106
3fae39208d06
Fixes #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
100
diff
changeset
|
125 this.bttnCancel.Text = "cancel"; |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
126 this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
127 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
128 // lblRaceList |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
129 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
130 this.lblRaceList.Location = new System.Drawing.Point(12, 33); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
131 this.lblRaceList.Name = "lblRaceList"; |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
132 this.lblRaceList.Size = new System.Drawing.Size(92, 80); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
133 this.lblRaceList.TabIndex = 5; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
134 this.lblRaceList.Text = "race list"; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
135 this.lblRaceList.TextAlign = System.Drawing.ContentAlignment.TopRight; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
136 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
137 // bttnSelectRace |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
138 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
139 this.bttnSelectRace.Enabled = false; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
140 this.bttnSelectRace.FlatStyle = System.Windows.Forms.FlatStyle.System; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
141 this.bttnSelectRace.Location = new System.Drawing.Point(254, 231); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
142 this.bttnSelectRace.Name = "bttnSelectRace"; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
143 this.bttnSelectRace.Size = new System.Drawing.Size(104, 24); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
144 this.bttnSelectRace.TabIndex = 4; |
106
3fae39208d06
Fixes #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
100
diff
changeset
|
145 this.bttnSelectRace.Text = "create army"; |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
146 this.bttnSelectRace.Click += new System.EventHandler(this.bttnSelectRace_Click); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
147 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
148 // lblArmyName |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
149 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
150 this.lblArmyName.Location = new System.Drawing.Point(12, 163); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
151 this.lblArmyName.Name = "lblArmyName"; |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
152 this.lblArmyName.Size = new System.Drawing.Size(92, 17); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
153 this.lblArmyName.TabIndex = 8; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
154 this.lblArmyName.Text = "army name"; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
155 this.lblArmyName.TextAlign = System.Drawing.ContentAlignment.TopRight; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
156 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
157 // txtArmyName |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
158 // |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
159 this.txtArmyName.Location = new System.Drawing.Point(110, 160); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
160 this.txtArmyName.Name = "txtArmyName"; |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
161 this.txtArmyName.Size = new System.Drawing.Size(248, 20); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
162 this.txtArmyName.TabIndex = 9; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
163 this.txtArmyName.TextChanged += new System.EventHandler(this.txtArmyName_TextChanged); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
164 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
165 // lblArmySize |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
166 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
167 this.lblArmySize.Location = new System.Drawing.Point(12, 188); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
168 this.lblArmySize.Name = "lblArmySize"; |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
169 this.lblArmySize.Size = new System.Drawing.Size(92, 18); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
170 this.lblArmySize.TabIndex = 10; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
171 this.lblArmySize.Text = "army size"; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
172 this.lblArmySize.TextAlign = System.Drawing.ContentAlignment.TopRight; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
173 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
174 // armySize |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
175 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
176 this.armySize.Increment = new decimal(new int[] { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
177 50, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
178 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
179 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
180 0}); |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
181 this.armySize.Location = new System.Drawing.Point(110, 186); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
182 this.armySize.Maximum = new decimal(new int[] { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
183 1000000, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
184 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
185 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
186 0}); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
187 this.armySize.Name = "armySize"; |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
188 this.armySize.Size = new System.Drawing.Size(99, 20); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
189 this.armySize.TabIndex = 11; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
190 this.armySize.ThousandsSeparator = true; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
191 this.armySize.Value = new decimal(new int[] { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
192 2000, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
193 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
194 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
195 0}); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
196 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
197 // lblGameSystem |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
198 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
199 this.lblGameSystem.Location = new System.Drawing.Point(12, 9); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
200 this.lblGameSystem.Name = "lblGameSystem"; |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
201 this.lblGameSystem.Size = new System.Drawing.Size(92, 18); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
202 this.lblGameSystem.TabIndex = 12; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
203 this.lblGameSystem.Text = "game system"; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
204 this.lblGameSystem.TextAlign = System.Drawing.ContentAlignment.TopRight; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
205 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
206 // gameSystems |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
207 // |
56
11e81ba85684
Fixes #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
54
diff
changeset
|
208 this.gameSystems.DisplayMember = "Name"; |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
209 this.gameSystems.FormattingEnabled = true; |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
210 this.gameSystems.Location = new System.Drawing.Point(110, 6); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
211 this.gameSystems.Name = "gameSystems"; |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
212 this.gameSystems.Size = new System.Drawing.Size(248, 21); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
213 this.gameSystems.TabIndex = 13; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
214 this.gameSystems.SelectedValueChanged += new System.EventHandler(this.gameSystems_SelectedValueChanged); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
215 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
216 // FrmNewArmy |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
217 // |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
218 this.AcceptButton = this.bttnSelectRace; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
219 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
220 this.CancelButton = this.bttnCancel; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
221 this.ClientSize = new System.Drawing.Size(370, 267); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
222 this.Controls.Add(this.gameSystems); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
223 this.Controls.Add(this.lblGameSystem); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
224 this.Controls.Add(this.armySize); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
225 this.Controls.Add(this.lblArmySize); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
226 this.Controls.Add(this.txtArmyName); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
227 this.Controls.Add(this.lblArmyName); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
228 this.Controls.Add(this.bttnCancel); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
229 this.Controls.Add(this.lblRaceList); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
230 this.Controls.Add(this.bttnSelectRace); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
231 this.Controls.Add(this.lstRaces); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
232 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
233 this.Icon = ((System.Drawing.Icon) (resources.GetObject("$this.Icon"))); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
234 this.MaximizeBox = false; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
235 this.MinimizeBox = false; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
236 this.Name = "FrmNewArmy"; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
237 this.ShowInTaskbar = false; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
238 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
239 this.Text = "FrmNewArmy"; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
240 ((System.ComponentModel.ISupportInitialize) (this.armySize)).EndInit(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
241 this.ResumeLayout(false); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
242 this.PerformLayout(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
243 |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
244 } |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
245 #endregion |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
246 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
247 public GameSystem SelectedSystem |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
248 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
249 get { return system; } |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
250 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
251 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
252 public Race SelectedRace |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
253 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
254 get { return race; } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
255 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
256 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
257 public string ArmyName |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
258 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
259 get { return armyName; } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
260 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
261 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
262 public int ArmySize |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
263 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
264 get { return maxPoints; } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
265 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
266 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
267 private void bttnCancel_Click(object sender, System.EventArgs e) |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
268 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
269 DialogResult = DialogResult.Cancel; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
270 this.Close(); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
271 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
272 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
273 private void bttnSelectRace_Click(object sender, System.EventArgs e) |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
274 { |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
275 DialogResult = DialogResult.OK; |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
276 SetValues(); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
277 this.Close(); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
278 } |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
279 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
280 private void SetValues() |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
281 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
282 system = GetSelectedGameSystem(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
283 race = (Race) lstRaces.SelectedItem; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
284 armyName = txtArmyName.Text; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
285 maxPoints = (int) armySize.Value; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
286 } |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
287 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
288 private GameSystem GetSelectedGameSystem() |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
289 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
290 return (GameSystem) gameSystems.SelectedItem; |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
291 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
292 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
293 private void txtArmyName_TextChanged(object sender, System.EventArgs e) |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
294 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
295 setSelectRaceEnabledVal(); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
296 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
297 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
298 private void setSelectRaceEnabledVal() |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
299 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
300 bttnSelectRace.Enabled = (lstRaces.SelectedIndex>-1 && txtArmyName.Text.Trim()!="" && armySize.Value > 0); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
301 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
302 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
303 private void lstRaces_SelectedIndexChanged(object sender, System.EventArgs e) |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
304 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
305 setSelectRaceEnabledVal(); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
306 } |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
307 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
308 private void gameSystems_SelectedValueChanged(object sender, EventArgs e) |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
309 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
310 GameSystem selected = GetSelectedGameSystem(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
311 lstRaces.Items.Clear(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
312 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
313 if (selected != null) |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
314 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
315 SetRaces(selected); |
100
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
316 |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
317 if (lstRaces.Items.Count > 0) |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
318 { |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
319 lstRaces.SelectedIndex = 0; |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
320 } |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
321 } |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
322 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
323 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
324 } |