Mercurial > repos > IBBoard.WarFoundry.GUI.WinForms
annotate FrmNewArmy.cs @ 246:b57a7cf844f8
Fixes #426: Changing unit size doesn't trigger all validation
* Hook validation in to army composition changed event
* Make sure we're ignoring old armies and listening to the new one
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 01 Sep 2012 16:12:48 +0100 |
parents | 2bde6d18d3bd |
children |
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 { |
188 | 23 |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
24 private IContainer components; |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
25 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
|
26 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
|
27 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
|
28 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
|
29 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
|
30 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
|
31 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
|
32 private IBBLabel lblGameSystem; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
33 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
|
34 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
|
35 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
36 private GameSystem system; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
37 private Race race; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
38 private string armyName; |
200 | 39 public bool isDefaultArmyName; |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
40 private ToolTip gameSystemToolTip; |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
41 private Hyperlink getMoreLink; |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
42 private int maxPoints; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
43 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
44 public FrmNewArmy(GameSystem system) |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
45 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
46 InitializeComponent(); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
47 |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
48 ControlTranslator.TranslateControl(this); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
49 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
50 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
|
51 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
52 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
|
53 } |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
54 |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
55 if (gameSystems.Items.Count > 0) |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
56 { |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
57 gameSystems.Enabled = true; |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
58 lblGameSystem.Image = null; |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
59 } |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
60 else |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
61 { |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
62 gameSystems.Enabled = false; |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
63 gameSystemToolTip.SetToolTip(lblGameSystem, Translation.GetTranslation("newArmyNoGameSystems", "could not load data for game systems - please check logs")); |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
64 } |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
65 |
110
39b93ca5fb9c
Fixes #234: Invalid data file doesn't stop load
IBBoard <dev@ibboard.co.uk>
parents:
106
diff
changeset
|
66 if (system != null) |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
67 { |
110
39b93ca5fb9c
Fixes #234: Invalid data file doesn't stop load
IBBoard <dev@ibboard.co.uk>
parents:
106
diff
changeset
|
68 gameSystems.SelectedItem = system; |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
69 } |
100
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
70 else if (gameSystems.Items.Count == 1) |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
71 { |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
72 gameSystems.SelectedIndex = 0; |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
73 } |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
74 } |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
75 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
76 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
|
77 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
78 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
|
79 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
80 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
|
81 } |
80
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 /// <summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
85 /// 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
|
86 /// </summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
87 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
|
88 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
89 if( disposing ) |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
90 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
91 if(components != null) |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
92 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
93 components.Dispose(); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
94 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
95 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
96 base.Dispose( disposing ); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
97 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
98 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
99 #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
|
100 /// <summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
101 /// 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
|
102 /// 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
|
103 /// </summary> |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
104 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
|
105 { |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
106 this.components = new System.ComponentModel.Container(); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
107 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
|
108 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
|
109 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
|
110 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
|
111 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
|
112 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
|
113 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
|
114 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
|
115 this.armySize = new System.Windows.Forms.NumericUpDown(); |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
116 this.gameSystems = new System.Windows.Forms.ComboBox(); |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
117 this.lblGameSystem = new IBBoard.Windows.Forms.IBBLabel(); |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
118 this.gameSystemToolTip = new System.Windows.Forms.ToolTip(this.components); |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
119 this.getMoreLink = new IBBoard.Windows.Forms.Hyperlink(); |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
120 ((System.ComponentModel.ISupportInitialize)(this.armySize)).BeginInit(); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
121 this.SuspendLayout(); |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
122 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
123 // lstRaces |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
124 // |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
125 this.lstRaces.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
126 | System.Windows.Forms.AnchorStyles.Right))); |
56
11e81ba85684
Fixes #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
54
diff
changeset
|
127 this.lstRaces.DisplayMember = "Name"; |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
128 this.lstRaces.Enabled = false; |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
129 this.lstRaces.Location = new System.Drawing.Point(141, 33); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
130 this.lstRaces.Name = "lstRaces"; |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
131 this.lstRaces.Size = new System.Drawing.Size(265, 121); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
132 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
|
133 this.lstRaces.SelectedIndexChanged += new System.EventHandler(this.lstRaces_SelectedIndexChanged); |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
134 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
135 // bttnCancel |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
136 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
137 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
|
138 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
|
139 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
|
140 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
|
141 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
|
142 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
|
143 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
|
144 this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click); |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
145 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
146 // lblRaceList |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
147 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
148 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
|
149 this.lblRaceList.Name = "lblRaceList"; |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
150 this.lblRaceList.Size = new System.Drawing.Size(123, 80); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
151 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
|
152 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
|
153 this.lblRaceList.TextAlign = System.Drawing.ContentAlignment.TopRight; |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
154 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
155 // bttnSelectRace |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
156 // |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
157 this.bttnSelectRace.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
158 | System.Windows.Forms.AnchorStyles.Right))); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
159 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
|
160 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
|
161 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
|
162 this.bttnSelectRace.Name = "bttnSelectRace"; |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
163 this.bttnSelectRace.Size = new System.Drawing.Size(152, 24); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
164 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
|
165 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
|
166 this.bttnSelectRace.Click += new System.EventHandler(this.bttnSelectRace_Click); |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
167 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
168 // lblArmyName |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
169 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
170 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
|
171 this.lblArmyName.Name = "lblArmyName"; |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
172 this.lblArmyName.Size = new System.Drawing.Size(123, 17); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
173 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
|
174 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
|
175 this.lblArmyName.TextAlign = System.Drawing.ContentAlignment.TopRight; |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
176 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
177 // txtArmyName |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
178 // |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
179 this.txtArmyName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
180 | System.Windows.Forms.AnchorStyles.Right))); |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
181 this.txtArmyName.Enabled = false; |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
182 this.txtArmyName.Location = new System.Drawing.Point(141, 160); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
183 this.txtArmyName.Name = "txtArmyName"; |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
184 this.txtArmyName.Size = new System.Drawing.Size(265, 20); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
185 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
|
186 this.txtArmyName.TextChanged += new System.EventHandler(this.txtArmyName_TextChanged); |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
187 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
188 // lblArmySize |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
189 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
190 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
|
191 this.lblArmySize.Name = "lblArmySize"; |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
192 this.lblArmySize.Size = new System.Drawing.Size(123, 18); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
193 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
|
194 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
|
195 this.lblArmySize.TextAlign = System.Drawing.ContentAlignment.TopRight; |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
196 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
197 // armySize |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
198 // |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
199 this.armySize.Enabled = false; |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
200 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
|
201 50, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
202 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
203 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
204 0}); |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
205 this.armySize.Location = new System.Drawing.Point(141, 186); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
206 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
|
207 1000000, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
208 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
209 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
210 0}); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
211 this.armySize.Name = "armySize"; |
84
1e85a0687e4d
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
80
diff
changeset
|
212 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
|
213 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
|
214 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
|
215 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
|
216 2000, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
217 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
218 0, |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
219 0}); |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
220 this.armySize.ValueChanged += new System.EventHandler(this.armySize_ValueChanged); |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
221 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
222 // gameSystems |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
223 // |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
224 this.gameSystems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
225 | System.Windows.Forms.AnchorStyles.Right))); |
56
11e81ba85684
Fixes #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
54
diff
changeset
|
226 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
|
227 this.gameSystems.FormattingEnabled = true; |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
228 this.gameSystems.Location = new System.Drawing.Point(141, 6); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
229 this.gameSystems.Name = "gameSystems"; |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
230 this.gameSystems.Size = new System.Drawing.Size(265, 21); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
231 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
|
232 this.gameSystems.SelectedValueChanged += new System.EventHandler(this.gameSystems_SelectedValueChanged); |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
233 // |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
234 // lblGameSystem |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
235 // |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
236 this.lblGameSystem.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.warning_sml; |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
237 this.lblGameSystem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
238 this.lblGameSystem.Location = new System.Drawing.Point(12, 9); |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
239 this.lblGameSystem.Name = "lblGameSystem"; |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
240 this.lblGameSystem.Size = new System.Drawing.Size(123, 18); |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
241 this.lblGameSystem.TabIndex = 12; |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
242 this.lblGameSystem.Text = "game system"; |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
243 this.lblGameSystem.TextAlign = System.Drawing.ContentAlignment.TopRight; |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
244 // |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
245 // getMoreLink |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
246 // |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
247 this.getMoreLink.Location = new System.Drawing.Point(12, 131); |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
248 this.getMoreLink.Name = "getMoreLink"; |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
249 this.getMoreLink.Size = new System.Drawing.Size(123, 23); |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
250 this.getMoreLink.TabIndex = 14; |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
251 this.getMoreLink.TabStop = true; |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
252 this.getMoreLink.Text = "get more"; |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
253 this.getMoreLink.TextAlign = System.Drawing.ContentAlignment.BottomRight; |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
254 this.getMoreLink.Url = "http://warfoundry.co.uk/Downloads/datafiles/"; |
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
255 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
256 // FrmNewArmy |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
257 // |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
258 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); |
138
18d607b0249b
Re #203: Translate to multiple languages
IBBoard <dev@ibboard.co.uk>
parents:
110
diff
changeset
|
259 this.ClientSize = new System.Drawing.Size(418, 267); |
242
2bde6d18d3bd
Re #417: Improve install/first use experience
IBBoard <dev@ibboard.co.uk>
parents:
220
diff
changeset
|
260 this.Controls.Add(this.getMoreLink); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
261 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
|
262 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
|
263 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
|
264 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
|
265 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
|
266 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
|
267 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
|
268 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
|
269 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
|
270 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
|
271 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
272 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
273 this.MaximizeBox = false; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
274 this.MinimizeBox = false; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
275 this.Name = "FrmNewArmy"; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
276 this.ShowInTaskbar = false; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
277 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
|
278 this.Text = "FrmNewArmy"; |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
279 ((System.ComponentModel.ISupportInitialize)(this.armySize)).EndInit(); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
280 this.ResumeLayout(false); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
281 this.PerformLayout(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
282 |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
283 } |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
284 #endregion |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
285 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
286 public GameSystem SelectedSystem |
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 get { return system; } |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
289 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
290 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
291 public Race SelectedRace |
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 get { return race; } |
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 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
296 public string ArmyName |
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 get { return armyName; } |
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 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
301 public int ArmySize |
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 get { return maxPoints; } |
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 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
306 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
|
307 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
308 DialogResult = DialogResult.Cancel; |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
309 this.Close(); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
310 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
311 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
312 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
|
313 { |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
314 DialogResult = DialogResult.OK; |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
315 SetValues(); |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
316 this.Close(); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
317 } |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
318 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
319 private void SetValues() |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
320 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
321 system = GetSelectedGameSystem(); |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
322 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
|
323 armyName = txtArmyName.Text; |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
324 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
|
325 } |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
326 |
200 | 327 private void armySize_ValueChanged(object sender, System.EventArgs e) |
328 { | |
329 if (txtArmyName.Enabled && isDefaultArmyName) | |
330 { | |
331 setTxtArmyNameVal(); | |
332 } | |
333 } | |
334 | |
335 private GameSystem GetSelectedGameSystem() | |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
336 { |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
337 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
|
338 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
339 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
340 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
|
341 { |
200 | 342 isDefaultArmyName = false ; |
343 setSelectRaceEnabledVal(); | |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
344 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
345 |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
346 private void setSelectRaceEnabledVal() |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
347 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
348 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
|
349 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
350 |
220
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
351 private void setTxtArmyNameVal() |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
352 { |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
353 if (lstRaces.SelectedIndex > -1) |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
354 { |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
355 double armySizeDbl = (double)armySize.Value; |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
356 txtArmyName.Text = String.Format(race.ArmyDefaultName, Translation.GetTranslation("armySizePts", "{0}{1}", armySizeDbl, system.GetPointsAbbrev(armySizeDbl), system.GetPointsName(armySizeDbl))); |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
357 isDefaultArmyName = true; |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
358 } |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
359 } |
200 | 360 |
361 private void lstRaces_SelectedIndexChanged(object sender, System.EventArgs e) | |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
362 { |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
363 setSelectRaceEnabledVal(); |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
364 bool raceSelected = lstRaces.SelectedItem != null; |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
365 txtArmyName.Enabled = raceSelected; |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
366 armySize.Enabled = raceSelected; |
176
0e39412353c4
Fixes #153: Default name for armies
IBBoard <dev@ibboard.co.uk>
parents:
171
diff
changeset
|
367 race = (Race)lstRaces.SelectedItem; |
200 | 368 setTxtArmyNameVal(); |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
369 } |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
370 |
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
371 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
|
372 { |
220
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
373 system = GetSelectedGameSystem(); |
200 | 374 txtArmyName.Text = ""; |
220
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
375 txtArmyName.Enabled = false; |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
376 lstRaces.Items.Clear(); |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
377 armySize.Value = system.SystemArmyDefaultSize; |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
378 |
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
379 if (system != null) |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
380 { |
220
467decfdde8e
Closes #327: "Points" system should be used in UI
IBBoard <dev@ibboard.co.uk>
parents:
219
diff
changeset
|
381 SetRaces(system); |
100
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
382 |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
383 if (lstRaces.Items.Count == 1) |
100
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
384 { |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
385 lstRaces.SelectedIndex = 0; |
88b5a0da73f2
Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents:
84
diff
changeset
|
386 } |
54
d6ff354a5d84
Re #166: Move game system changing to part of army creation
IBBoard <dev@ibboard.co.uk>
parents:
46
diff
changeset
|
387 } |
171
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
388 |
0e17097db8e5
Fixes #300: WinForms UI doesn't make it obvious why nothing is listed on first run
IBBoard <dev@ibboard.co.uk>
parents:
138
diff
changeset
|
389 lstRaces.Enabled = lstRaces.Items.Count > 0; |
80
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
390 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
391 } |
c243b043aa62
Re #179: Make sure that translations are used throughout UI
IBBoard <dev@ibboard.co.uk>
parents:
56
diff
changeset
|
392 } |