Mercurial > repos > IBBoard.WarFoundry.GUI.WinForms
annotate FrmMain.cs @ 241:e532d2f51ff0
Re #417: Make installation/first use easier
* Add "Add Data File" menu item
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 19 May 2012 16:21:00 +0100 |
parents | 55c94d438a4b |
children | 425912324be5 |
rev | line source |
---|---|
142 | 1 // This file (FrmMain.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard. |
2 // | |
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. | |
4 | |
5 using System; | |
6 using System.Collections.Generic; | |
7 using System.Drawing; | |
8 using System.Drawing.Drawing2D; | |
9 using System.ComponentModel; | |
10 using System.Windows.Forms; | |
11 using System.Data; | |
12 using System.IO; | |
13 using System.Threading; | |
14 using log4net; | |
15 using IBBoard; | |
16 using IBBoard.CustomMath; | |
17 using IBBoard.Commands; | |
18 using IBBoard.IO; | |
19 using IBBoard.Lang; | |
20 using IBBoard.Windows.Forms; | |
21 using IBBoard.Windows.Forms.I18N; | |
22 using IBBoard.Xml; | |
23 using IBBoard.WarFoundry.API; | |
24 using IBBoard.WarFoundry.API.Commands; | |
25 using IBBoard.WarFoundry.API.Exporters; | |
26 using IBBoard.WarFoundry.API.Objects; | |
196
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
27 using IBBoard.WarFoundry.API.Objects.Requirement; |
190 | 28 using IBBoard.WarFoundry.API.Util; |
142 | 29 using IBBoard.WarFoundry.API.Savers; |
193 | 30 using IBBoard.WarFoundry.API.Savers.Xml; |
142 | 31 using IBBoard.WarFoundry.API.Factories; |
32 using IBBoard.WarFoundry.API.Factories.Xml; | |
33 | |
34 namespace IBBoard.WarFoundry.GUI.WinForms | |
35 { | |
36 /// <summary> | |
37 /// Summary description for Form1. | |
38 /// </summary> | |
39 public class FrmMain : System.Windows.Forms.Form | |
40 { | |
41 private static readonly string AppTitle = "WarFoundry"; | |
183
75afd724a825
* Increase WarFoundry WinForms version numbers to 0.1 in preparation for first WinForms release
IBBoard <dev@ibboard.co.uk>
parents:
181
diff
changeset
|
42 internal static readonly string VERSION = "0.1"; |
217
c47094612bac
Re #355: Add XML export format that can be transformed with an XSL
IBBoard <dev@ibboard.co.uk>
parents:
214
diff
changeset
|
43 const string DefaultDataDir = "data"; |
142 | 44 |
45 private Preferences preferences; | |
46 private readonly ILog log = LogManager.GetLogger(typeof(FrmMain)); | |
47 | |
48 private CommandStack commandStack; | |
49 | |
50 public ObjectAddDelegate UnitAddedMethod; | |
51 public ObjectRemoveDelegate UnitRemovedMethod; | |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
52 public StringValChangedDelegate ArmyNameChangedMethod; |
142 | 53 public DoubleValChangedDelegate PointsValueChangedMethod; |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
54 public IntValChangedDelegate MaxPointsValueChangedMethod; |
142 | 55 |
56 private FrmArmyTree armyTree; | |
57 private string loadedFilePath; | |
58 private Dictionary<string, FrmUnit> unitWindows; | |
59 | |
60 private System.ComponentModel.IContainer components; | |
61 private System.Windows.Forms.OpenFileDialog openArmyDialog; | |
62 private System.Windows.Forms.SaveFileDialog saveArmyDialog; | |
63 private System.Windows.Forms.MainMenu mainMenu; | |
64 private IBBoard.Windows.Forms.ColorableStatusBarPanel sbMainPanel; | |
65 private IBBoard.Windows.Forms.ColorableStatusBarPanel sbErrorPanel; | |
66 private IBBoard.Windows.Forms.ColorableStatusBarPanel sbPointsPanel; | |
67 private System.Windows.Forms.ContextMenu undoMenu; | |
68 private System.Windows.Forms.ContextMenu redoMenu; | |
217
c47094612bac
Re #355: Add XML export format that can be transformed with an XSL
IBBoard <dev@ibboard.co.uk>
parents:
214
diff
changeset
|
69 private IBBoard.Windows.Forms.ColorableStatusBar statusBar; |
142 | 70 private MenuStrip menuStrip; |
71 private IBBToolStripMenuItem menuFile; | |
72 private IBBToolStripMenuItem miNewArmy; | |
73 private IBBToolStripMenuItem miOpenArmy; | |
74 private IBBToolStripMenuItem miSaveArmy; | |
75 private IBBToolStripMenuItem miSaveArmyAs; | |
76 private IBBToolStripMenuItem miExportArmyAs; | |
77 private IBBToolStripMenuItem miExportArmyAsBasicHTML; | |
78 private IBBToolStripMenuItem miCloseArmy; | |
79 private ToolStripSeparator toolStripSeparator1; | |
80 private IBBToolStripMenuItem miReloadFiles; | |
81 private ToolStripSeparator toolStripSeparator2; | |
82 private IBBToolStripMenuItem miExit; | |
83 private IBBToolStripMenuItem menuEdit; | |
84 private IBBToolStripMenuItem miUndo; | |
85 private IBBToolStripMenuItem miRedo; | |
86 private IBBToolStripMenuItem menuHelp; | |
87 private ToolStrip mainToolStrip; | |
88 private IBBToolStripButton bttnNewArmy; | |
89 private IBBToolStripButton bttnOpenArmy; | |
90 private IBBToolStripButton bttnSaveArmy; | |
91 private ToolStripSeparator toolStripSeparator3; | |
92 private IBBToolStripSplitButton bttnUndo; | |
93 private IBBToolStripSplitButton bttnRedo; | |
94 private ToolStrip catToolStrip; | |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
95 private ToolStripPanel toolStripPanel; |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
96 private ToolStripSeparator toolStripSeparator4; |
217
c47094612bac
Re #355: Add XML export format that can be transformed with an XSL
IBBoard <dev@ibboard.co.uk>
parents:
214
diff
changeset
|
97 private IBBToolStripMenuItem miPreferences; |
c47094612bac
Re #355: Add XML export format that can be transformed with an XSL
IBBoard <dev@ibboard.co.uk>
parents:
214
diff
changeset
|
98 private IBBToolStripMenuItem miExportArmyAsBasicXml; |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
99 private IBBToolStripMenuItem miEditArmy; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
100 private ToolStripSeparator toolStripSeparator5; |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
101 private IBBToolStripMenuItem miAddDataFile; |
142 | 102 private IBBToolStripMenuItem miAbout; |
103 | |
190 | 104 |
142 | 105 /// <summary> |
106 /// The main entry point for the application. | |
107 /// </summary> | |
108 [STAThread] | |
109 static void Main(string[] args) | |
110 { | |
111 try | |
112 { | |
113 LogManager.GetLogger(typeof(FrmMain)).Info("Starting WarFoundry WinForms"); | |
114 Application.EnableVisualStyles(); | |
115 Application.Run(new FrmMain(args)); | |
116 LogManager.GetLogger(typeof(FrmMain)).Info("Closing WarFoundry WinForms"); | |
117 } | |
118 catch (Exception ex) | |
119 { | |
120 LogManager.GetLogger(typeof(FrmMain)).Fatal(ex); | |
121 MessageBox.Show(null, "A major, unexpected and fatal error ocurred while starting the application: \r\n\r\n" + ex.Message + "\r\n\r\n" + ex.StackTrace, "Fatal error", MessageBoxButtons.OK, MessageBoxIcon.Error); | |
122 } | |
123 } | |
124 | |
125 public FrmMain(string[] args) | |
126 { | |
127 this.Closing+=new CancelEventHandler(FrmMain_Closing); | |
128 CommandStack.CommandStackUpdated += new MethodInvoker(commandStack_CommandStackUpdated); | |
129 | |
130 InitializeComponent(); | |
131 toolStripPanel.Join(mainToolStrip, 0, 0); | |
132 toolStripPanel.Join(catToolStrip, mainToolStrip.Right, 0); | |
133 | |
134 Preferences = new Preferences("WarFoundry"); | |
135 try | |
136 { | |
137 Translation.InitialiseTranslations(Constants.ExecutablePath, Preferences["language"].ToString()); | |
138 } | |
139 catch (TranslationLoadException ex) | |
140 { | |
141 log.Error("Translation loading failed for language " + Preferences["language"].ToString(), ex); | |
142 MessageBox.Show(this, "Translation loading failed for language " + Preferences["language"].ToString(), "Translation failure", MessageBoxButtons.OK, MessageBoxIcon.Error); | |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
143 } |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
144 |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
145 Translation.TranslationChanged += new MethodInvoker(TranslationChanged); |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
146 |
142 | 147 TranslateControls(); |
148 unitWindows = new Dictionary<string, FrmUnit>(); | |
149 | |
150 WarFoundryCore.GameSystemChanged+= new GameSystemChangedDelegate(FrmMain_GameSystemChanged); | |
151 WarFoundryCore.ArmyChanged += new ArmyChangedDelegate(FrmMain_ArmyChanged); | |
152 UnitAddedMethod = new ObjectAddDelegate(FrmMain_UnitAddedMethod); | |
153 UnitRemovedMethod = new ObjectRemoveDelegate(FrmMain_UnitRemovedMethod); | |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
154 ArmyNameChangedMethod = new StringValChangedDelegate(FrmMain_ArmyNameChangedMethod); |
142 | 155 PointsValueChangedMethod = new DoubleValChangedDelegate(FrmMain_PointsValueChangedMethod); |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
156 MaxPointsValueChangedMethod = new IntValChangedDelegate(FrmMain_MaxPointsValueChangedMethod); |
142 | 157 |
158 sbErrorPanel.Color = Color.Red; | |
190 | 159 SetPointsPanelToolTipText(); |
142 | 160 |
144
4023a9bdcb8b
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
142
diff
changeset
|
161 // hack to load default files |
4023a9bdcb8b
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
142
diff
changeset
|
162 WarFoundryLoader.GetDefault().AddLoadDirectory(new DirectoryInfo(Constants.ExecutablePath + Constants.DirectoryString + DefaultDataDir)); |
4023a9bdcb8b
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
142
diff
changeset
|
163 WarFoundryLoader.GetDefault().RegisterFactory(WarFoundryXmlFactory.GetFactory()); |
142 | 164 WarFoundryLoader.GetDefault().FileLoadingFinished += FileLoadingFinished; |
193 | 165 WarFoundrySaver.SetFileSaver(new WarFoundryXmlFileSaver()); |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
166 } |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
167 |
159
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
168 private FrmArmyTree GetArmyTree() |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
169 { |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
170 if (armyTree == null || armyTree.IsDisposed) |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
171 { |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
172 CreateArmyTree(); |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
173 } |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
174 |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
175 return armyTree; |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
176 } |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
177 |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
178 private void CreateArmyTree() |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
179 { |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
180 armyTree = new FrmArmyTree(CommandStack); |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
181 armyTree.MdiParent = this; |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
182 armyTree.StartPosition = FormStartPosition.Manual; |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
183 armyTree.Location = new Point(this.DisplayRectangle.Width - armyTree.Width - 10, 10); |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
184 } |
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
185 |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
186 private void TranslateControls() |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
187 { |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
188 ControlTranslator.TranslateControls(Controls); |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
189 ControlTranslator.TranslateComponents(components.Components); |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
190 ControlTranslator.TranslateComponent(openArmyDialog); |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
191 ControlTranslator.TranslateComponent(saveArmyDialog); |
190 | 192 //translate pointspanel and tooltip |
193 SetPointsPanelToolTipText(); | |
194 SetPointsPanelText(); | |
195 } | |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
196 |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
197 void TranslationChanged() |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
198 { |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
199 TranslateControls(); |
142 | 200 } |
201 | |
202 public static string DataPath | |
203 { | |
204 get { return Constants.ExecutablePath+Constants.DirectoryChar+"data"; } | |
205 } | |
206 | |
207 public static String ArmiesPath | |
208 { | |
209 get { return Environment.GetFolderPath(Environment.SpecialFolder.Personal); } | |
210 } | |
211 | |
212 public Preferences Preferences | |
213 { | |
214 get { return preferences; } | |
215 set { preferences = value; } | |
216 } | |
217 | |
218 public CommandStack CommandStack | |
219 { | |
220 get | |
221 { | |
222 if (commandStack == null) | |
223 { | |
224 commandStack = new CommandStack(); | |
225 } | |
226 | |
227 return commandStack; | |
228 } | |
229 } | |
230 | |
231 /// <summary> | |
232 /// Clean up any resources being used. | |
233 /// </summary> | |
234 protected override void Dispose( bool disposing ) | |
235 { | |
236 if( disposing ) | |
237 { | |
238 if (components != null) | |
239 { | |
240 components.Dispose(); | |
241 } | |
242 } | |
243 base.Dispose( disposing ); | |
244 } | |
245 | |
246 #region Windows Form Designer generated code | |
247 /// <summary> | |
248 /// Required method for Designer support - do not modify | |
249 /// the contents of this method with the code editor. | |
250 /// </summary> | |
251 private void InitializeComponent() | |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
252 { |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
253 this.components = new System.ComponentModel.Container(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
254 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
255 this.undoMenu = new System.Windows.Forms.ContextMenu(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
256 this.redoMenu = new System.Windows.Forms.ContextMenu(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
257 this.mainMenu = new System.Windows.Forms.MainMenu(this.components); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
258 this.openArmyDialog = new System.Windows.Forms.OpenFileDialog(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
259 this.saveArmyDialog = new System.Windows.Forms.SaveFileDialog(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
260 this.menuStrip = new System.Windows.Forms.MenuStrip(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
261 this.menuFile = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
262 this.miNewArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
263 this.miOpenArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
264 this.miSaveArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
265 this.miSaveArmyAs = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
266 this.miExportArmyAs = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
267 this.miExportArmyAsBasicHTML = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
268 this.miExportArmyAsBasicXml = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
269 this.miCloseArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
270 this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
271 this.miAddDataFile = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
272 this.miReloadFiles = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
273 this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
274 this.miExit = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
275 this.menuEdit = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
276 this.miUndo = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
277 this.miRedo = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
278 this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
279 this.miEditArmy = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
280 this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
281 this.miPreferences = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
282 this.menuHelp = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
283 this.miAbout = new IBBoard.Windows.Forms.IBBToolStripMenuItem(); |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
284 this.mainToolStrip = new System.Windows.Forms.ToolStrip(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
285 this.bttnNewArmy = new IBBoard.Windows.Forms.IBBToolStripButton(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
286 this.bttnOpenArmy = new IBBoard.Windows.Forms.IBBToolStripButton(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
287 this.bttnSaveArmy = new IBBoard.Windows.Forms.IBBToolStripButton(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
288 this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
289 this.bttnUndo = new IBBoard.Windows.Forms.IBBToolStripSplitButton(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
290 this.bttnRedo = new IBBoard.Windows.Forms.IBBToolStripSplitButton(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
291 this.catToolStrip = new System.Windows.Forms.ToolStrip(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
292 this.toolStripPanel = new System.Windows.Forms.ToolStripPanel(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
293 this.statusBar = new IBBoard.Windows.Forms.ColorableStatusBar(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
294 this.sbMainPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
295 this.sbErrorPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
296 this.sbPointsPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel(); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
297 this.menuStrip.SuspendLayout(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
298 this.mainToolStrip.SuspendLayout(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
299 ((System.ComponentModel.ISupportInitialize)(this.sbMainPanel)).BeginInit(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
300 ((System.ComponentModel.ISupportInitialize)(this.sbErrorPanel)).BeginInit(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
301 ((System.ComponentModel.ISupportInitialize)(this.sbPointsPanel)).BeginInit(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
302 this.SuspendLayout(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
303 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
304 // saveArmyDialog |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
305 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
306 this.saveArmyDialog.Title = "Translatable:saveArmyDialog"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
307 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
308 // menuStrip |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
309 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
310 this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
311 this.menuFile, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
312 this.menuEdit, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
313 this.menuHelp}); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
314 this.menuStrip.Location = new System.Drawing.Point(0, 0); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
315 this.menuStrip.Name = "menuStrip"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
316 this.menuStrip.Size = new System.Drawing.Size(790, 24); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
317 this.menuStrip.TabIndex = 6; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
318 this.menuStrip.Text = "menuStrip1"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
319 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
320 // menuFile |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
321 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
322 this.menuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
323 this.miNewArmy, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
324 this.miOpenArmy, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
325 this.miSaveArmy, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
326 this.miSaveArmyAs, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
327 this.miExportArmyAs, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
328 this.miCloseArmy, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
329 this.toolStripSeparator1, |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
330 this.miAddDataFile, |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
331 this.miReloadFiles, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
332 this.toolStripSeparator2, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
333 this.miExit}); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
334 this.menuFile.Name = "menuFile"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
335 this.menuFile.Size = new System.Drawing.Size(33, 20); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
336 this.menuFile.Text = "&file"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
337 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
338 // miNewArmy |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
339 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
340 this.miNewArmy.Name = "miNewArmy"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
341 this.miNewArmy.Size = new System.Drawing.Size(170, 22); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
342 this.miNewArmy.Text = "&new army"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
343 this.miNewArmy.Click += new System.EventHandler(this.miNewArmy_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
344 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
345 // miOpenArmy |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
346 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
347 this.miOpenArmy.Name = "miOpenArmy"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
348 this.miOpenArmy.Size = new System.Drawing.Size(170, 22); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
349 this.miOpenArmy.Text = "&open army"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
350 this.miOpenArmy.Click += new System.EventHandler(this.miOpenArmy_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
351 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
352 // miSaveArmy |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
353 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
354 this.miSaveArmy.Enabled = false; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
355 this.miSaveArmy.Name = "miSaveArmy"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
356 this.miSaveArmy.Size = new System.Drawing.Size(170, 22); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
357 this.miSaveArmy.Text = "&save army"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
358 this.miSaveArmy.Click += new System.EventHandler(this.miSaveArmy_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
359 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
360 // miSaveArmyAs |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
361 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
362 this.miSaveArmyAs.Enabled = false; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
363 this.miSaveArmyAs.Name = "miSaveArmyAs"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
364 this.miSaveArmyAs.Size = new System.Drawing.Size(170, 22); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
365 this.miSaveArmyAs.Text = "save army &as..."; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
366 this.miSaveArmyAs.Click += new System.EventHandler(this.miSaveArmyAs_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
367 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
368 // miExportArmyAs |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
369 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
370 this.miExportArmyAs.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { |
207
ac5f87626abd
Basic XML translations
Dan.Kulinski@dank-laptop.Global.Local
parents:
197
diff
changeset
|
371 this.miExportArmyAsBasicHTML, |
ac5f87626abd
Basic XML translations
Dan.Kulinski@dank-laptop.Global.Local
parents:
197
diff
changeset
|
372 this.miExportArmyAsBasicXml}); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
373 this.miExportArmyAs.Enabled = false; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
374 this.miExportArmyAs.Name = "miExportArmyAs"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
375 this.miExportArmyAs.Size = new System.Drawing.Size(170, 22); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
376 this.miExportArmyAs.Text = "export army as..."; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
377 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
378 // miExportArmyAsBasicHTML |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
379 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
380 this.miExportArmyAsBasicHTML.Name = "miExportArmyAsBasicHTML"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
381 this.miExportArmyAsBasicHTML.Size = new System.Drawing.Size(132, 22); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
382 this.miExportArmyAsBasicHTML.Text = "&basic html"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
383 this.miExportArmyAsBasicHTML.Click += new System.EventHandler(this.miExportArmyAsBasicHTML_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
384 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
385 // miExportArmyAsBasicXml |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
386 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
387 this.miExportArmyAsBasicXml.Name = "miExportArmyAsBasicXml"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
388 this.miExportArmyAsBasicXml.Size = new System.Drawing.Size(132, 22); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
389 this.miExportArmyAsBasicXml.Text = "basic xml"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
390 this.miExportArmyAsBasicXml.Click += new System.EventHandler(this.miExportArmyAsBasicXml_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
391 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
392 // miCloseArmy |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
393 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
394 this.miCloseArmy.Enabled = false; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
395 this.miCloseArmy.Name = "miCloseArmy"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
396 this.miCloseArmy.Size = new System.Drawing.Size(170, 22); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
397 this.miCloseArmy.Text = "&close army"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
398 this.miCloseArmy.Click += new System.EventHandler(this.miCloseArmy_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
399 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
400 // toolStripSeparator1 |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
401 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
402 this.toolStripSeparator1.Name = "toolStripSeparator1"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
403 this.toolStripSeparator1.Size = new System.Drawing.Size(167, 6); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
404 // |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
405 // miAddDataFile |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
406 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
407 this.miAddDataFile.Name = "miAddDataFile"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
408 this.miAddDataFile.Size = new System.Drawing.Size(170, 22); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
409 this.miAddDataFile.Text = "add data file"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
410 this.miAddDataFile.Click += new System.EventHandler(this.AddDataFile_Click); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
411 // |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
412 // miReloadFiles |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
413 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
414 this.miReloadFiles.Name = "miReloadFiles"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
415 this.miReloadFiles.Size = new System.Drawing.Size(170, 22); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
416 this.miReloadFiles.Text = "&reload files"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
417 this.miReloadFiles.Click += new System.EventHandler(this.miReloadFiles_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
418 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
419 // toolStripSeparator2 |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
420 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
421 this.toolStripSeparator2.Name = "toolStripSeparator2"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
422 this.toolStripSeparator2.Size = new System.Drawing.Size(167, 6); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
423 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
424 // miExit |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
425 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
426 this.miExit.Name = "miExit"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
427 this.miExit.Size = new System.Drawing.Size(170, 22); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
428 this.miExit.Text = "e&xit"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
429 this.miExit.Click += new System.EventHandler(this.miExit_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
430 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
431 // menuEdit |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
432 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
433 this.menuEdit.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
434 this.miUndo, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
435 this.miRedo, |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
436 this.toolStripSeparator4, |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
437 this.miEditArmy, |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
438 this.toolStripSeparator5, |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
439 this.miPreferences}); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
440 this.menuEdit.Name = "menuEdit"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
441 this.menuEdit.Size = new System.Drawing.Size(37, 20); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
442 this.menuEdit.Text = "&edit"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
443 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
444 // miUndo |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
445 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
446 this.miUndo.Enabled = false; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
447 this.miUndo.Name = "miUndo"; |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
448 this.miUndo.Size = new System.Drawing.Size(143, 22); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
449 this.miUndo.Text = "&undo"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
450 this.miUndo.Click += new System.EventHandler(this.miUndo_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
451 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
452 // miRedo |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
453 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
454 this.miRedo.Enabled = false; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
455 this.miRedo.Name = "miRedo"; |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
456 this.miRedo.Size = new System.Drawing.Size(143, 22); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
457 this.miRedo.Text = "&redo"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
458 this.miRedo.Click += new System.EventHandler(this.miRedo_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
459 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
460 // toolStripSeparator4 |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
461 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
462 this.toolStripSeparator4.Name = "toolStripSeparator4"; |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
463 this.toolStripSeparator4.Size = new System.Drawing.Size(140, 6); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
464 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
465 // miEditArmy |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
466 // |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
467 this.miEditArmy.Enabled = false; |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
468 this.miEditArmy.Name = "miEditArmy"; |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
469 this.miEditArmy.Size = new System.Drawing.Size(143, 22); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
470 this.miEditArmy.Text = "&edit army"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
471 this.miEditArmy.Click += new System.EventHandler(this.miEditArmy_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
472 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
473 // toolStripSeparator5 |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
474 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
475 this.toolStripSeparator5.Name = "toolStripSeparator5"; |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
476 this.toolStripSeparator5.Size = new System.Drawing.Size(140, 6); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
477 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
478 // miPreferences |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
479 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
480 this.miPreferences.Name = "miPreferences"; |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
481 this.miPreferences.Size = new System.Drawing.Size(143, 22); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
482 this.miPreferences.Text = "&preferences"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
483 this.miPreferences.Click += new System.EventHandler(this.miPreferences_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
484 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
485 // menuHelp |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
486 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
487 this.menuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
488 this.miAbout}); |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
489 this.menuHelp.Name = "menuHelp"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
490 this.menuHelp.Size = new System.Drawing.Size(39, 20); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
491 this.menuHelp.Text = "&help"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
492 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
493 // miAbout |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
494 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
495 this.miAbout.Name = "miAbout"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
496 this.miAbout.Size = new System.Drawing.Size(113, 22); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
497 this.miAbout.Text = "&about"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
498 this.miAbout.Click += new System.EventHandler(this.miAbout_Click); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
499 // |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
500 // mainToolStrip |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
501 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
502 this.mainToolStrip.Dock = System.Windows.Forms.DockStyle.None; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
503 this.mainToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
504 this.bttnNewArmy, |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
505 this.bttnOpenArmy, |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
506 this.bttnSaveArmy, |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
507 this.toolStripSeparator3, |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
508 this.bttnUndo, |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
509 this.bttnRedo}); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
510 this.mainToolStrip.Location = new System.Drawing.Point(0, 24); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
511 this.mainToolStrip.Name = "mainToolStrip"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
512 this.mainToolStrip.Size = new System.Drawing.Size(151, 25); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
513 this.mainToolStrip.TabIndex = 8; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
514 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
515 // bttnNewArmy |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
516 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
517 this.bttnNewArmy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
518 this.bttnNewArmy.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.document_new; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
519 this.bttnNewArmy.ImageTransparentColor = System.Drawing.Color.Magenta; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
520 this.bttnNewArmy.Name = "bttnNewArmy"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
521 this.bttnNewArmy.Size = new System.Drawing.Size(23, 22); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
522 this.bttnNewArmy.Text = "new army"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
523 this.bttnNewArmy.Click += new System.EventHandler(this.miNewArmy_Click); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
524 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
525 // bttnOpenArmy |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
526 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
527 this.bttnOpenArmy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
528 this.bttnOpenArmy.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.document_open; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
529 this.bttnOpenArmy.ImageTransparentColor = System.Drawing.Color.Magenta; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
530 this.bttnOpenArmy.Name = "bttnOpenArmy"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
531 this.bttnOpenArmy.Size = new System.Drawing.Size(23, 22); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
532 this.bttnOpenArmy.Text = "open army"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
533 this.bttnOpenArmy.Click += new System.EventHandler(this.miOpenArmy_Click); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
534 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
535 // bttnSaveArmy |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
536 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
537 this.bttnSaveArmy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
538 this.bttnSaveArmy.Enabled = false; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
539 this.bttnSaveArmy.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.document_save; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
540 this.bttnSaveArmy.ImageTransparentColor = System.Drawing.Color.Magenta; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
541 this.bttnSaveArmy.Name = "bttnSaveArmy"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
542 this.bttnSaveArmy.Size = new System.Drawing.Size(23, 22); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
543 this.bttnSaveArmy.Text = "save army"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
544 this.bttnSaveArmy.Click += new System.EventHandler(this.miSaveArmy_Click); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
545 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
546 // toolStripSeparator3 |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
547 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
548 this.toolStripSeparator3.Name = "toolStripSeparator3"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
549 this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
550 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
551 // bttnUndo |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
552 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
553 this.bttnUndo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
554 this.bttnUndo.Enabled = false; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
555 this.bttnUndo.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_undo; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
556 this.bttnUndo.ImageTransparentColor = System.Drawing.Color.Magenta; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
557 this.bttnUndo.Name = "bttnUndo"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
558 this.bttnUndo.Size = new System.Drawing.Size(32, 22); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
559 this.bttnUndo.Text = "undo"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
560 this.bttnUndo.ButtonClick += new System.EventHandler(this.miUndo_Click); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
561 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
562 // bttnRedo |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
563 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
564 this.bttnRedo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
565 this.bttnRedo.Enabled = false; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
566 this.bttnRedo.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_redo; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
567 this.bttnRedo.ImageTransparentColor = System.Drawing.Color.Magenta; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
568 this.bttnRedo.Name = "bttnRedo"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
569 this.bttnRedo.Size = new System.Drawing.Size(32, 22); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
570 this.bttnRedo.Text = "redo"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
571 this.bttnRedo.ButtonClick += new System.EventHandler(this.miRedo_Click); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
572 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
573 // catToolStrip |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
574 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
575 this.catToolStrip.Dock = System.Windows.Forms.DockStyle.None; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
576 this.catToolStrip.Location = new System.Drawing.Point(161, 24); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
577 this.catToolStrip.Name = "catToolStrip"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
578 this.catToolStrip.Size = new System.Drawing.Size(111, 25); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
579 this.catToolStrip.TabIndex = 9; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
580 this.catToolStrip.Visible = false; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
581 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
582 // toolStripPanel |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
583 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
584 this.toolStripPanel.Dock = System.Windows.Forms.DockStyle.Top; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
585 this.toolStripPanel.Location = new System.Drawing.Point(0, 24); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
586 this.toolStripPanel.Name = "toolStripPanel"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
587 this.toolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
588 this.toolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
589 this.toolStripPanel.Size = new System.Drawing.Size(790, 0); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
590 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
591 // statusBar |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
592 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
593 this.statusBar.Location = new System.Drawing.Point(0, 586); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
594 this.statusBar.Name = "statusBar"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
595 this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] { |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
596 this.sbMainPanel, |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
597 this.sbErrorPanel, |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
598 this.sbPointsPanel}); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
599 this.statusBar.ShowPanels = true; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
600 this.statusBar.Size = new System.Drawing.Size(790, 22); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
601 this.statusBar.TabIndex = 1; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
602 this.statusBar.DrawItem += new System.Windows.Forms.StatusBarDrawItemEventHandler(this.statusBar_DrawItem); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
603 this.statusBar.PanelClick += new System.Windows.Forms.StatusBarPanelClickEventHandler(this.statusBar_PanelClick); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
604 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
605 // sbMainPanel |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
606 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
607 this.sbMainPanel.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
608 this.sbMainPanel.Color = System.Drawing.SystemColors.WindowText; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
609 this.sbMainPanel.Name = "sbMainPanel"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
610 this.sbMainPanel.Style = System.Windows.Forms.StatusBarPanelStyle.OwnerDraw; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
611 this.sbMainPanel.Width = 473; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
612 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
613 // sbErrorPanel |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
614 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
615 this.sbErrorPanel.Color = System.Drawing.SystemColors.WindowText; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
616 this.sbErrorPanel.Name = "sbErrorPanel"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
617 this.sbErrorPanel.Style = System.Windows.Forms.StatusBarPanelStyle.OwnerDraw; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
618 this.sbErrorPanel.Width = 150; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
619 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
620 // sbPointsPanel |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
621 // |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
622 this.sbPointsPanel.Color = System.Drawing.SystemColors.WindowText; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
623 this.sbPointsPanel.Name = "sbPointsPanel"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
624 this.sbPointsPanel.Style = System.Windows.Forms.StatusBarPanelStyle.OwnerDraw; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
625 this.sbPointsPanel.ToolTipText = "current points total"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
626 this.sbPointsPanel.Width = 150; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
627 // |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
628 // FrmMain |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
629 // |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
630 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
631 this.ClientSize = new System.Drawing.Size(790, 608); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
632 this.Controls.Add(this.mainToolStrip); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
633 this.Controls.Add(this.toolStripPanel); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
634 this.Controls.Add(this.statusBar); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
635 this.Controls.Add(this.catToolStrip); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
636 this.Controls.Add(this.menuStrip); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
637 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
638 this.IsMdiContainer = true; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
639 this.MainMenuStrip = this.menuStrip; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
640 this.Menu = this.mainMenu; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
641 this.Name = "FrmMain"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
642 this.Text = "WarFoundry"; |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
643 this.Load += new System.EventHandler(this.FrmMain_Load); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
644 this.menuStrip.ResumeLayout(false); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
645 this.menuStrip.PerformLayout(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
646 this.mainToolStrip.ResumeLayout(false); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
647 this.mainToolStrip.PerformLayout(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
648 ((System.ComponentModel.ISupportInitialize)(this.sbMainPanel)).EndInit(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
649 ((System.ComponentModel.ISupportInitialize)(this.sbErrorPanel)).EndInit(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
650 ((System.ComponentModel.ISupportInitialize)(this.sbPointsPanel)).EndInit(); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
651 this.ResumeLayout(false); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
652 this.PerformLayout(); |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
653 |
142 | 654 } |
655 #endregion | |
656 | |
657 private void FileLoadingFinished(List<FileLoadFailure> failures) | |
658 { | |
659 foreach (FileLoadFailure failure in failures) | |
660 { | |
661 log.Warn("Failed to load " + failure.FailedFile.FullName + ": " + failure.Message); | |
662 } | |
663 } | |
664 | |
665 private void miExit_Click(object sender, System.EventArgs e) | |
666 { | |
667 Application.Exit(); | |
668 } | |
669 | |
670 private void miNewArmy_Click(object sender, System.EventArgs e) | |
671 { | |
672 CreateNewArmy(); | |
673 } | |
674 | |
675 private void CreateNewArmy() | |
676 { | |
677 if (CloseCurrentArmy()) | |
678 { | |
679 FrmNewArmy newArmy = new FrmNewArmy(CurrentGameSystem); | |
680 DialogResult dr = newArmy.ShowDialog(); | |
681 | |
682 if (dr == DialogResult.OK) | |
683 { | |
684 try | |
685 { | |
686 CurrentArmy = new Army(newArmy.SelectedRace, newArmy.ArmyName, newArmy.ArmySize); | |
687 } | |
688 catch (RequiredDataMissingException ex) | |
689 { | |
690 log.Error("Required data missing from race file", ex); | |
691 MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidRaceFileBoxTitle", "invalid race file"), MessageBoxButtons.OK, MessageBoxIcon.Error); | |
692 } | |
693 catch (InvalidFileException ex) | |
694 { | |
695 log.Error("Race file was invalid", ex); | |
696 MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidRaceFileBoxTitle", "invalid race file"), MessageBoxButtons.OK, MessageBoxIcon.Error); | |
697 } | |
698 } | |
699 } | |
700 } | |
701 | |
702 private bool OpenArmy() | |
703 { | |
704 if (openArmyDialog.Filter=="") | |
705 { | |
706 string savePath = ArmiesPath; | |
707 | |
708 if (!Directory.Exists(savePath)) | |
709 { | |
710 Directory.CreateDirectory(savePath); | |
711 } | |
712 | |
713 openArmyDialog.InitialDirectory = savePath; | |
714 openArmyDialog.Filter = Translation.GetTranslation("armyFileFilter")+"|*.army"; | |
715 openArmyDialog.Title = Translation.GetTranslation("openArmyDialog"); | |
716 | |
717 } | |
718 | |
719 DialogResult dr = openArmyDialog.ShowDialog(this); | |
720 | |
721 if (dr == DialogResult.OK) | |
722 { | |
723 if (CloseCurrentArmy()) | |
724 { | |
725 try | |
726 { | |
727 string newFilePath = openArmyDialog.FileName; | |
728 CurrentArmy = WarFoundryLoader.GetDefault().LoadArmy(new FileInfo(newFilePath)); | |
729 loadedFilePath = newFilePath; | |
730 return true; | |
731 } | |
732 catch (RequiredDataMissingException ex) | |
733 { | |
734 log.Error(ex); | |
735 MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidArmyFileBoxTitle", "invalid army file"), MessageBoxButtons.OK, MessageBoxIcon.Error); | |
736 return false; | |
737 } | |
738 catch (InvalidFileException ex) | |
739 { | |
740 log.Error(ex); | |
741 MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidArmyFileBoxTitle", "invalid army file"), MessageBoxButtons.OK, MessageBoxIcon.Error); | |
742 return false; | |
743 } | |
744 } | |
745 else | |
746 { | |
747 return false; | |
748 } | |
749 } | |
750 else | |
751 { | |
752 return false; | |
753 } | |
754 } | |
755 | |
756 private bool CloseCurrentArmy() | |
757 { | |
758 if (CurrentArmy!=null) | |
759 { | |
760 bool canClose = false; | |
761 | |
762 if (CommandStack.IsDirty()) | |
763 { | |
764 string saveChanges = Translation.GetTranslation("SaveChangesQuestion", "the army \"{0}\" has been modified\r\nsave changes before closing army?", CurrentArmy.Name); | |
765 string saveChangesTitle = Translation.GetTranslation("SaveChangesTitle", "unsaved changes"); | |
766 DialogResult dr = MessageBox.Show(this, saveChanges, saveChangesTitle, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button3); | |
767 | |
768 if (dr == DialogResult.Yes) | |
769 { | |
770 canClose = SaveCurrentArmy(); | |
771 } | |
772 else if (dr == DialogResult.No) | |
773 { | |
774 canClose = true; | |
775 } | |
776 //else they said cancel and we default to "canClose = false" so do nothing | |
777 } | |
778 else | |
779 { | |
780 canClose = true; | |
781 } | |
782 | |
783 if (canClose) | |
784 { | |
785 //do close | |
786 DisableCategoryButtons(); | |
787 CurrentArmy = null; | |
788 return true; | |
789 } | |
790 else | |
791 { | |
792 return false; | |
793 } | |
794 } | |
795 else | |
796 { | |
797 DisableCategoryButtons(); | |
798 //pretend we succeeded | |
799 return true; | |
800 } | |
801 } | |
802 | |
803 private void UndoLastAction() | |
804 { | |
805 if (commandStack.CanUndo()) | |
806 { | |
807 commandStack.Undo(); | |
808 } | |
809 } | |
810 | |
811 private void RedoAction() | |
812 { | |
813 if (commandStack.CanRedo()) | |
814 { | |
815 commandStack.Redo(); | |
816 } | |
817 } | |
818 | |
819 private bool SaveCurrentArmy() | |
820 { | |
821 bool saved = false; | |
822 | |
823 string filePath = loadedFilePath; | |
824 | |
825 if (filePath == null) | |
826 { | |
827 filePath = PromptForArmyFilePath(); | |
828 } | |
829 | |
830 if (filePath != null) | |
831 { | |
832 saved = SaveCurrentArmyToFile(filePath); | |
833 } | |
834 | |
835 return saved; | |
836 } | |
837 | |
838 private bool SaveCurrentArmyAs() | |
839 { | |
840 bool saved = false; | |
841 string filePath = PromptForArmyFilePath(); | |
842 | |
843 if (filePath != null) | |
844 { | |
845 saved = SaveCurrentArmyToFile(filePath); | |
846 } | |
847 | |
848 return saved; | |
849 } | |
850 | |
851 private bool SaveCurrentArmyToFile(string filePath) | |
852 { | |
193 | 853 if (WarFoundrySaver.GetSaver().Save(filePath, CurrentArmy)) |
142 | 854 { |
855 loadedFilePath = filePath; | |
856 miSaveArmy.Enabled = false; | |
857 bttnSaveArmy.Enabled = false; | |
858 CommandStack.setCleanMark(); | |
859 return true; | |
860 } | |
861 else | |
862 { | |
863 MessageBox.Show(this, Translation.GetTranslation("SaveFailed", "file save failed - check log for details"), Translation.GetTranslation("SaveFailedTitle", "file save failed"), MessageBoxButtons.OK, MessageBoxIcon.Error); | |
864 return false; | |
865 } | |
866 } | |
867 | |
868 private string PromptForArmyFilePath() | |
869 { | |
870 if (saveArmyDialog.Filter == "") | |
871 { | |
872 string savePath = ArmiesPath; | |
873 | |
874 if (!Directory.Exists(savePath)) | |
875 { | |
876 Directory.CreateDirectory(savePath); | |
877 } | |
878 | |
879 saveArmyDialog.InitialDirectory = savePath; | |
880 saveArmyDialog.Filter = Translation.GetTranslation("armyFileFilter")+"|*.army"; | |
881 saveArmyDialog.Title = Translation.GetTranslation("saveArmyDialog"); | |
882 } | |
883 | |
884 DialogResult dr = saveArmyDialog.ShowDialog(this); | |
885 | |
886 if (dr == DialogResult.OK) | |
887 { | |
888 return saveArmyDialog.FileName; | |
889 } | |
890 else | |
891 { | |
892 return null; | |
893 } | |
894 } | |
895 | |
896 public GameSystem CurrentGameSystem | |
897 { | |
898 get { return WarFoundryCore.CurrentGameSystem; } | |
899 set { WarFoundryCore.CurrentGameSystem = value; } | |
900 } | |
901 | |
902 public Army CurrentArmy | |
903 { | |
904 get { return WarFoundryCore.CurrentArmy; } | |
905 set { SetArmy(value); } | |
906 } | |
907 | |
908 private void FrmMain_GameSystemChanged(GameSystem oldSystem, GameSystem newSystem) | |
909 { | |
238
55c94d438a4b
Re #58: Remove LogNotifier from API
IBBoard <dev@ibboard.co.uk>
parents:
237
diff
changeset
|
910 if (newSystem != null) |
55c94d438a4b
Re #58: Remove LogNotifier from API
IBBoard <dev@ibboard.co.uk>
parents:
237
diff
changeset
|
911 { |
55c94d438a4b
Re #58: Remove LogNotifier from API
IBBoard <dev@ibboard.co.uk>
parents:
237
diff
changeset
|
912 log.DebugFormat("Game system set to {0} with ID {1}", newSystem.Name, newSystem.ID); |
55c94d438a4b
Re #58: Remove LogNotifier from API
IBBoard <dev@ibboard.co.uk>
parents:
237
diff
changeset
|
913 } |
55c94d438a4b
Re #58: Remove LogNotifier from API
IBBoard <dev@ibboard.co.uk>
parents:
237
diff
changeset
|
914 else |
55c94d438a4b
Re #58: Remove LogNotifier from API
IBBoard <dev@ibboard.co.uk>
parents:
237
diff
changeset
|
915 { |
55c94d438a4b
Re #58: Remove LogNotifier from API
IBBoard <dev@ibboard.co.uk>
parents:
237
diff
changeset
|
916 log.Debug("Game system set to null"); |
55c94d438a4b
Re #58: Remove LogNotifier from API
IBBoard <dev@ibboard.co.uk>
parents:
237
diff
changeset
|
917 } |
55c94d438a4b
Re #58: Remove LogNotifier from API
IBBoard <dev@ibboard.co.uk>
parents:
237
diff
changeset
|
918 |
142 | 919 SetAppTitle(); |
195
983d96be91f5
Fixes #161: Re-implement "load last used game system by default" in WinForms
IBBoard <dev@ibboard.co.uk>
parents:
193
diff
changeset
|
920 |
983d96be91f5
Fixes #161: Re-implement "load last used game system by default" in WinForms
IBBoard <dev@ibboard.co.uk>
parents:
193
diff
changeset
|
921 if (newSystem == null) |
983d96be91f5
Fixes #161: Re-implement "load last used game system by default" in WinForms
IBBoard <dev@ibboard.co.uk>
parents:
193
diff
changeset
|
922 { |
983d96be91f5
Fixes #161: Re-implement "load last used game system by default" in WinForms
IBBoard <dev@ibboard.co.uk>
parents:
193
diff
changeset
|
923 Preferences["currSystem"] = ""; |
983d96be91f5
Fixes #161: Re-implement "load last used game system by default" in WinForms
IBBoard <dev@ibboard.co.uk>
parents:
193
diff
changeset
|
924 } |
983d96be91f5
Fixes #161: Re-implement "load last used game system by default" in WinForms
IBBoard <dev@ibboard.co.uk>
parents:
193
diff
changeset
|
925 else |
983d96be91f5
Fixes #161: Re-implement "load last used game system by default" in WinForms
IBBoard <dev@ibboard.co.uk>
parents:
193
diff
changeset
|
926 { |
983d96be91f5
Fixes #161: Re-implement "load last used game system by default" in WinForms
IBBoard <dev@ibboard.co.uk>
parents:
193
diff
changeset
|
927 Preferences["currSystem"] = newSystem.ID; |
983d96be91f5
Fixes #161: Re-implement "load last used game system by default" in WinForms
IBBoard <dev@ibboard.co.uk>
parents:
193
diff
changeset
|
928 } |
983d96be91f5
Fixes #161: Re-implement "load last used game system by default" in WinForms
IBBoard <dev@ibboard.co.uk>
parents:
193
diff
changeset
|
929 |
983d96be91f5
Fixes #161: Re-implement "load last used game system by default" in WinForms
IBBoard <dev@ibboard.co.uk>
parents:
193
diff
changeset
|
930 Preferences.Save(); |
142 | 931 RemoveCategoryButtons(); |
932 } | |
933 | |
934 private void FrmMain_ArmyChanged(Army oldArmy, Army newArmy) | |
935 { | |
936 CommandStack.Reset(); | |
237
ea5cb50ebe5e
Fixes #384: Validation warnings don't get cleared when creating new armies
IBBoard <dev@ibboard.co.uk>
parents:
234
diff
changeset
|
937 ValidateArmy(); |
142 | 938 loadedFilePath = null; |
939 miSaveArmy.Enabled = false; | |
940 bttnSaveArmy.Enabled = false; | |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
941 miEditArmy.Enabled = (CurrentArmy != null); |
196
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
942 //TODO: Subscribe to an "army changed" event here |
142 | 943 SetPointsPanelText(); |
944 SetAppTitle(); | |
945 } | |
946 | |
947 private void SetArmy(Army newArmy) | |
948 { | |
949 IgnoreArmy(CurrentArmy); | |
950 CloseAllUnitWindows(); | |
951 | |
952 if (newArmy == null) | |
953 { | |
954 SetNullArmyState(); | |
955 } | |
956 else | |
957 { | |
958 WarFoundryCore.CurrentGameSystem = newArmy.GameSystem; | |
959 ListenToArmy(newArmy); | |
960 SetNonNullArmyState(newArmy); | |
961 } | |
962 | |
963 WarFoundryCore.CurrentArmy = newArmy; | |
964 } | |
965 | |
966 private void IgnoreArmy(Army oldArmy) | |
967 { | |
968 if (oldArmy != null) | |
969 { | |
970 oldArmy.UnitAdded -= UnitAddedMethod; | |
971 oldArmy.UnitRemoved -= UnitRemovedMethod; | |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
972 oldArmy.NameChanged -= ArmyNameChangedMethod; |
142 | 973 oldArmy.PointsValueChanged -= PointsValueChangedMethod; |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
974 oldArmy.MaxPointsValueChanged -= MaxPointsValueChangedMethod; |
142 | 975 } |
976 } | |
977 | |
978 private void CloseAllUnitWindows() | |
979 { | |
980 FrmUnit[] unitForms = DictionaryUtils.ToArray(unitWindows); | |
981 | |
982 foreach (FrmUnit window in unitForms) | |
983 { | |
984 window.Close(); | |
985 } | |
986 | |
987 unitWindows.Clear(); | |
988 } | |
989 | |
990 private void ListenToArmy(Army newArmy) | |
991 { | |
992 if (newArmy != null) | |
993 { | |
994 newArmy.UnitAdded += UnitAddedMethod; | |
995 newArmy.UnitRemoved += UnitRemovedMethod; | |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
996 newArmy.NameChanged += ArmyNameChangedMethod; |
142 | 997 newArmy.PointsValueChanged += PointsValueChangedMethod; |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
998 newArmy.MaxPointsValueChanged += MaxPointsValueChangedMethod; |
142 | 999 } |
1000 } | |
1001 | |
1002 private void SetNullArmyState() | |
1003 { | |
1004 miSaveArmyAs.Enabled = false; | |
1005 miCloseArmy.Enabled = false; | |
1006 miExportArmyAs.Enabled = false; | |
1007 DisableCategoryButtons(); | |
159
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
1008 GetArmyTree().Hide(); |
142 | 1009 } |
1010 | |
1011 private void SetNonNullArmyState(Army newArmy) | |
1012 { | |
1013 SetCategoryButtons(newArmy.Race.Categories); | |
1014 EnableCategoryButtons(); | |
1015 miSaveArmyAs.Enabled = true; | |
1016 miCloseArmy.Enabled = true; | |
1017 miExportArmyAs.Enabled = true; | |
159
964f946d3cac
Fixes #288: WarFoundry WinForms assumes that army tree will be open
IBBoard <dev@ibboard.co.uk>
parents:
158
diff
changeset
|
1018 GetArmyTree().Show(); |
142 | 1019 } |
1020 | |
1021 private void SetCategoryButtons(Category[] cats) | |
1022 { | |
1023 if (CategoryButtonsHaveChanged(cats)) | |
1024 { | |
1025 RemoveCategoryButtons(); | |
1026 AddCategoryButtons(cats); | |
1027 } | |
1028 } | |
1029 | |
1030 private bool CategoryButtonsHaveChanged(Category[] cats) | |
1031 { | |
1032 int catCount = cats.Length; | |
1033 ToolStripItemCollection items = catToolStrip.Items; | |
1034 bool haveChanged = (!catToolStrip.Visible || catCount != items.Count); | |
1035 | |
1036 if (!haveChanged) | |
1037 { | |
1038 for (int i = 0; i < catCount; i++) | |
1039 { | |
1040 if (cats[i].Equals(items[i+1].Tag)) | |
1041 { | |
1042 haveChanged = true; | |
1043 break; | |
1044 } | |
1045 } | |
1046 } | |
1047 | |
1048 return haveChanged; | |
1049 } | |
1050 | |
1051 private void RemoveCategoryButtons() | |
1052 { | |
1053 this.Invoke(new MethodInvoker(catToolStrip.Items.Clear)); | |
1054 } | |
1055 | |
1056 private void AddCategoryButtons(Category[] cats) | |
1057 { | |
1058 int catCount = cats.Length; | |
1059 Category cat; | |
1060 IBBToolStripButton[] categoryButtons = new IBBToolStripButton[catCount]; | |
1061 | |
1062 for (int i = 0; i < catCount; i++) | |
1063 { | |
1064 cat = cats[i]; | |
1065 IBBToolStripButton button = new IBBToolStripButton(); | |
1066 button.Text = cat.Name; | |
1067 button.Tag = cat; | |
1068 button.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.list_add; | |
1069 button.Enabled = false; | |
1070 button.Click += new EventHandler(CreateUnitForCategoryButtonClick); | |
1071 categoryButtons[i] = button; | |
1072 } | |
1073 | |
146
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1074 this.Invoke(new ArrayMethodInvoker<IBBToolStripButton>(AddCatToolStripButtons), new object[] { categoryButtons }); |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1075 } |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1076 |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1077 private void AddCatToolStripButtons(IBBToolStripButton[] buttons) |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1078 { |
142 | 1079 log.Debug("Toolstrip width: " + catToolStrip.Width); |
146
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1080 catToolStrip.Items.AddRange(buttons); |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1081 catToolStrip.Refresh(); |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1082 int buttonWidths = 0; |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1083 |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1084 foreach (IBBToolStripButton button in buttons) |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1085 { |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1086 buttonWidths += button.Width; |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1087 } |
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1088 catToolStrip.Width = buttonWidths; |
142 | 1089 log.Debug("Button widths: " + buttonWidths); |
146
5d9d4c75305f
Fixes #250: New panels don't work perfectly in Linux through Mono
IBBoard <dev@ibboard.co.uk>
parents:
144
diff
changeset
|
1090 log.Debug("Toolstrip width: " + catToolStrip.Width); |
142 | 1091 } |
1092 | |
1093 private void CreateUnitForCategoryButtonClick(object sender, EventArgs e) | |
1094 { | |
1095 if (sender is IBBToolStripButton) | |
1096 { | |
1097 IBBToolStripButton button = (IBBToolStripButton)sender; | |
1098 object tag = button.Tag; | |
1099 | |
1100 if (tag is Category) | |
1101 { | |
1102 AddUnitFromCategory((Category)tag); | |
1103 } | |
1104 } | |
1105 } | |
1106 | |
1107 private void EnableCategoryButtons() | |
1108 { | |
1109 catToolStrip.Visible = true; | |
1110 SetCategoryButtonState(true); | |
1111 } | |
1112 | |
1113 private void DisableCategoryButtons() | |
1114 { | |
1115 catToolStrip.Visible = false; | |
1116 SetCategoryButtonState(false); | |
1117 } | |
1118 | |
1119 private void SetCategoryButtonState(bool state) | |
1120 { | |
1121 foreach (IBBToolStripButton button in catToolStrip.Items) | |
1122 { | |
1123 button.Enabled = state; | |
1124 } | |
1125 } | |
1126 | |
1127 private void miSaveArmyAs_Click(object sender, System.EventArgs e) | |
1128 { | |
1129 SaveCurrentArmyAs(); | |
1130 } | |
1131 | |
1132 private void commandStack_CommandStackUpdated() | |
1133 { | |
1134 bttnUndo.Enabled = commandStack.CanUndo(); | |
1135 miUndo.Enabled = bttnUndo.Enabled; | |
1136 bttnRedo.Enabled = commandStack.CanRedo(); | |
1137 miRedo.Enabled = bttnRedo.Enabled; | |
1138 | |
1139 PopulateRedoMenu(); | |
1140 PopulateUndoMenu(); | |
1141 | |
1142 bttnSaveArmy.Enabled = commandStack.IsDirty() && CurrentArmy!=null; | |
1143 miSaveArmy.Enabled = commandStack.IsDirty() && CurrentArmy!=null; | |
1144 } | |
1145 | |
1146 private void PopulateRedoMenu() | |
1147 { | |
1148 int redoLength = commandStack.RedoLength; | |
1149 int maxRedo = Math.Min(10, redoLength); | |
1150 ToolStripItemCollection dropDownItems = bttnRedo.DropDownItems; | |
1151 dropDownItems.Clear(); | |
1152 | |
1153 for (int i = 1; i <= maxRedo; i++) | |
1154 { | |
1155 Command cmd = commandStack.PeekRedoCommand(i); | |
1156 | |
1157 if (cmd == null) | |
1158 { | |
1159 break; | |
1160 } | |
1161 | |
1162 dropDownItems.Add(cmd.Description, null, redoMenu_Click); | |
1163 } | |
1164 | |
1165 if (redoLength > 0) | |
1166 { | |
1167 bttnRedo.Text = commandStack.PeekRedoCommand(1).Description; | |
1168 } | |
1169 else | |
1170 { | |
1171 bttnRedo.Text = Translation.GetTranslation("bttnRedo"); | |
1172 } | |
1173 } | |
1174 | |
1175 private void PopulateUndoMenu() | |
1176 { | |
1177 int undoLength = commandStack.UndoLength; | |
1178 int maxUndo = Math.Min(10, undoLength); | |
1179 ToolStripItemCollection dropDownItems = bttnUndo.DropDownItems; | |
1180 dropDownItems.Clear(); | |
1181 | |
1182 for (int i = 1; i <= maxUndo; i++) | |
1183 { | |
1184 Command cmd = commandStack.PeekUndoCommand(i); | |
1185 | |
1186 if (cmd == null) | |
1187 { | |
1188 break; | |
1189 } | |
1190 | |
1191 dropDownItems.Add(cmd.UndoDescription, null, undoMenu_Click); | |
1192 } | |
1193 | |
1194 if (undoLength > 0) | |
1195 { | |
1196 bttnUndo.Text = commandStack.PeekUndoCommand(1).UndoDescription; | |
1197 } | |
1198 else | |
1199 { | |
1200 bttnUndo.Text = Translation.GetTranslation("bttnUndo"); | |
1201 } | |
1202 } | |
1203 | |
1204 private void miSaveArmy_Click(object sender, System.EventArgs e) | |
1205 { | |
1206 SaveCurrentArmy(); | |
1207 } | |
1208 | |
1209 private void SetAppTitle() | |
1210 { | |
1211 string str = AppTitle; | |
1212 | |
1213 if (CurrentGameSystem!=null) | |
1214 { | |
1215 str+= " - "+CurrentGameSystem.Name; | |
1216 } | |
1217 | |
1218 if (CurrentArmy!=null) | |
1219 { | |
1220 str+= " - "+CurrentArmy.Name; | |
1221 } | |
1222 | |
1223 this.Text = str; | |
1224 } | |
1225 | |
234
c06d0865ff27
Fixes #388: Add "Add unit" options to army tree
IBBoard <dev@ibboard.co.uk>
parents:
222
diff
changeset
|
1226 internal void AddUnitFromCategory(Category cat) |
142 | 1227 { |
1228 FrmNewUnit newUnit = new FrmNewUnit(CurrentArmy.Race, cat, CurrentArmy); | |
1229 DialogResult dr = newUnit.ShowDialog(this); | |
1230 | |
1231 if (dr == DialogResult.OK) | |
1232 { | |
1233 CreateAndAddUnitCommand cmd = new CreateAndAddUnitCommand(newUnit.SelectedUnit, CurrentArmy.GetCategory(cat)); | |
1234 commandStack.Execute(cmd); | |
1235 OpenUnitDialog(cmd.Unit); | |
1236 } | |
1237 } | |
1238 | |
1239 internal void OpenUnitDialog(Unit unit) | |
1240 { | |
1241 string unitID = unit.ID; | |
1242 | |
1243 if (unitWindows.ContainsKey(unitID)) | |
1244 { | |
1245 unitWindows[unitID].Focus(); | |
1246 } | |
1247 else | |
1248 { | |
1249 FrmUnit unitForm = new FrmUnit(unit, commandStack); | |
1250 unitWindows.Add(unitID, unitForm); | |
1251 unitForm.MdiParent = this; | |
1252 unitForm.Closing += new CancelEventHandler(unitForm_Closing); | |
1253 unitForm.Show(); | |
1254 } | |
1255 } | |
1256 | |
1257 private void unitForm_Closing(object sender, CancelEventArgs e) | |
1258 { | |
1259 if (sender is FrmUnit) | |
1260 { | |
1261 FrmUnit unitForm = (FrmUnit) sender; | |
1262 unitWindows.Remove(unitForm.Unit.ID); | |
1263 } | |
1264 } | |
1265 | |
1266 private void FrmMain_UnitAddedMethod(object unitObj) | |
1267 { | |
196
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1268 ValidateArmy(); |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1269 } |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1270 |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1271 private void ValidateArmy() |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1272 { |
197
10ba2c5340b2
Re #343: Show unit requirement failures
IBBoard <dev@ibboard.co.uk>
parents:
196
diff
changeset
|
1273 ICollection<string> failureMessages; |
237
ea5cb50ebe5e
Fixes #384: Validation warnings don't get cleared when creating new armies
IBBoard <dev@ibboard.co.uk>
parents:
234
diff
changeset
|
1274 if (CurrentArmy == null || Validates.AsOkay(RequirementHandler.ValidateArmy(CurrentArmy, out failureMessages))) |
196
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1275 { |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1276 sbErrorPanel.Text = ""; |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1277 sbErrorPanel.Tag = ""; |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1278 } |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1279 else |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1280 { |
197
10ba2c5340b2
Re #343: Show unit requirement failures
IBBoard <dev@ibboard.co.uk>
parents:
196
diff
changeset
|
1281 sbErrorPanel.Text = failureMessages.Count + " validation errors"; |
10ba2c5340b2
Re #343: Show unit requirement failures
IBBoard <dev@ibboard.co.uk>
parents:
196
diff
changeset
|
1282 sbErrorPanel.Tag = String.Join("\n", new List<string>(failureMessages).ToArray()); |
196
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1283 } |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1284 } |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1285 |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1286 private void FrmMain_UnitRemovedMethod(object unitObj) |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1287 { |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1288 ValidateArmy(); |
15148d255e50
* First stab at displaying new unit requirements
IBBoard <dev@ibboard.co.uk>
parents:
195
diff
changeset
|
1289 |
142 | 1290 if (unitObj is Unit) |
1291 { | |
1292 Unit unit = (Unit)unitObj; | |
1293 | |
1294 //check if window is open, and close it if it is | |
1295 foreach (Form frm in this.MdiChildren) | |
1296 { | |
1297 if (frm is FrmUnit) | |
1298 { | |
1299 if (((FrmUnit)frm).Unit == unit) | |
1300 { | |
1301 frm.Close(); | |
1302 break; | |
1303 } | |
1304 } | |
1305 } | |
1306 } | |
1307 } | |
1308 | |
1309 private void miUndo_Click(object sender, System.EventArgs e) | |
1310 { | |
1311 UndoLastAction(); | |
1312 } | |
1313 | |
1314 private void miRedo_Click(object sender, System.EventArgs e) | |
1315 { | |
1316 RedoAction(); | |
1317 } | |
1318 | |
1319 private void miCloseArmy_Click(object sender, EventArgs e) | |
1320 { | |
1321 CloseCurrentArmy(); | |
1322 } | |
1323 | |
1324 private void miOpenArmy_Click(object sender, EventArgs e) | |
1325 { | |
1326 OpenArmy(); | |
1327 } | |
1328 | |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1329 private void FrmMain_ArmyNameChangedMethod(WarFoundryObject obj, string oldString, string newString) |
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1330 { |
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1331 SetAppTitle(); |
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1332 } |
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1333 |
142 | 1334 private void FrmMain_PointsValueChangedMethod(WarFoundryObject obj, double oldVal, double newVal) |
1335 { | |
1336 if (obj is Army) | |
1337 { | |
1338 SetPointsPanelText(); | |
1339 } | |
1340 } | |
1341 | |
222
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1342 private void FrmMain_MaxPointsValueChangedMethod(WarFoundryObject obj, int oldVal, int newVal) |
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1343 { |
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1344 if (obj is Army) |
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1345 { |
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1346 SetPointsPanelText(); |
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1347 } |
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1348 } |
4ada3252d1ea
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
221
diff
changeset
|
1349 |
190 | 1350 private void SetPointsPanelText() |
142 | 1351 { |
1352 if (CurrentArmy==null) | |
1353 { | |
1354 sbPointsPanel.Text = ""; | |
1355 sbPointsPanel.ResetColor(); | |
1356 } | |
1357 else | |
1358 { | |
193 | 1359 string pointsPanelText = String.Format(Translation.GetTranslation("statusPanelPoints"), CurrentArmy.Points, CurrentGameSystem.GetPointsName(CurrentArmy.Points), CurrentArmy.MaxPoints, CurrentGameSystem.GetPointsName(CurrentArmy.MaxPoints)); |
190 | 1360 sbPointsPanel.Text = pointsPanelText; |
142 | 1361 |
1362 if (CurrentArmy.Points>CurrentArmy.MaxPoints) | |
1363 { | |
1364 sbPointsPanel.Color = Color.Red; | |
1365 } | |
1366 else | |
1367 { | |
1368 sbPointsPanel.ResetColor(); | |
1369 } | |
1370 } | |
1371 } | |
1372 | |
190 | 1373 private void SetPointsPanelToolTipText() |
1374 { | |
1375 sbPointsPanel.ToolTipText = Translation.GetTranslation("statusPanelPointsToolTip", "total points value"); | |
1376 } | |
1377 | |
142 | 1378 private void redoMenu_Click(object sender, EventArgs e) |
1379 { | |
1380 if (sender is ToolStripDropDownItem) | |
1381 { | |
1382 ToolStripDropDownItem item = (ToolStripDropDownItem)sender; | |
1383 //we know it's an redo menu item so find it's index and redo everything | |
1384 int max = bttnRedo.DropDownItems.IndexOf(item); | |
1385 | |
1386 if (max >= 0) | |
1387 { | |
1388 for (int i = 0; i <= max; i++) | |
1389 { | |
1390 commandStack.Redo(); | |
1391 } | |
1392 } | |
1393 } | |
1394 } | |
1395 | |
1396 private void undoMenu_Click(object sender, EventArgs e) | |
1397 { | |
1398 if (sender is ToolStripDropDownItem) | |
1399 { | |
1400 ToolStripDropDownItem item = (ToolStripDropDownItem)sender; | |
1401 //we know it's an redo menu item so find it's index and redo everything | |
1402 int max = bttnUndo.DropDownItems.IndexOf(item); | |
1403 | |
1404 if (max >= 0) | |
1405 { | |
1406 for (int i = 0; i <= max; i++) | |
1407 { | |
1408 commandStack.Undo(); | |
1409 } | |
1410 } | |
1411 } | |
1412 } | |
1413 | |
1414 private void statusBar_DrawItem(object sender, System.Windows.Forms.StatusBarDrawItemEventArgs sbdevent) | |
1415 { | |
1416 statusBar.ColorableStatusBarDrawItem(sender, sbdevent); | |
1417 } | |
1418 | |
1419 private void FrmMain_Closing(object sender, CancelEventArgs e) | |
1420 { | |
1421 if (!CloseCurrentArmy()) | |
1422 { | |
1423 e.Cancel = true; | |
1424 } | |
1425 } | |
1426 | |
1427 private void miReloadFiles_Click(object sender, System.EventArgs e) | |
1428 { | |
1429 WarFoundryLoader.GetDefault().LoadFiles(); | |
1430 sbMainPanel.Text = Translation.GetTranslation("GameSystemFilesReloaded", "Game system and race files reloaded"); | |
1431 } | |
1432 | |
1433 private void statusBar_PanelClick(object sender, StatusBarPanelClickEventArgs e) | |
1434 { | |
1435 if (e.StatusBarPanel == sbErrorPanel && sbErrorPanel.Text!="") | |
1436 { | |
1437 MessageBox.Show(this, sbErrorPanel.TagString, Translation.GetTranslation("FailedRequirementMessage"), MessageBoxButtons.OK, MessageBoxIcon.Warning); | |
1438 } | |
1439 } | |
1440 | |
1441 private void miExportArmyAsBasicHTML_Click(object sender, EventArgs e) | |
1442 { | |
1443 SaveFileDialog dialog = new SaveFileDialog(); | |
1444 dialog.Filter = Translation.GetTranslation("armyExportBasicHtmlFilter", "HTML pages") + "|*.html"; | |
1445 dialog.Title = Translation.GetTranslation("exportArmyDialog", "Export army"); | |
1446 | |
1447 DialogResult dr = dialog.ShowDialog(this); | |
1448 | |
1449 if (dr == DialogResult.OK) | |
1450 { | |
1451 Army army = CurrentArmy; | |
1452 string filePath = dialog.FileName; | |
1453 log.DebugFormat("Exporting {0} to {1} as basic HTML", army.Name, filePath); | |
1454 WarFoundryHtmlExporter.GetDefault().ExportArmy(army, filePath); | |
1455 } | |
1456 } | |
1457 | |
1458 private void FrmMain_Load(object sender, EventArgs e) | |
1459 { | |
1460 string gameSystemID = Preferences.GetStringProperty("currSystem"); | |
1461 | |
1462 if (gameSystemID != null && !"".Equals(gameSystemID)) | |
1463 { | |
1464 log.Debug("Attempting to load current game system from properties"); | |
1465 GameSystem sys = WarFoundryLoader.GetDefault().GetGameSystem(gameSystemID); | |
1466 | |
1467 if (sys != null) | |
1468 { | |
1469 WarFoundryCore.CurrentGameSystem = sys; | |
1470 log.InfoFormat("Loaded game system {0} from properties", gameSystemID); | |
1471 } | |
1472 } | |
1473 } | |
1474 | |
1475 private void miAbout_Click(object sender, EventArgs e) | |
1476 { | |
1477 FrmAbout about = new FrmAbout(); | |
1478 about.ShowDialog(this); | |
140
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
1479 } |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
1480 |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
1481 private void miPreferences_Click(object sender, EventArgs e) |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
1482 { |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
1483 FrmPreferences prefsForm = new FrmPreferences(Preferences); |
60c795eca8de
Re #265: Add language preference UI
IBBoard <dev@ibboard.co.uk>
parents:
137
diff
changeset
|
1484 prefsForm.Show(this); |
142 | 1485 } |
207
ac5f87626abd
Basic XML translations
Dan.Kulinski@dank-laptop.Global.Local
parents:
197
diff
changeset
|
1486 |
217
c47094612bac
Re #355: Add XML export format that can be transformed with an XSL
IBBoard <dev@ibboard.co.uk>
parents:
214
diff
changeset
|
1487 private void miExportArmyAsBasicXml_Click(object sender, EventArgs e) |
c47094612bac
Re #355: Add XML export format that can be transformed with an XSL
IBBoard <dev@ibboard.co.uk>
parents:
214
diff
changeset
|
1488 { |
c47094612bac
Re #355: Add XML export format that can be transformed with an XSL
IBBoard <dev@ibboard.co.uk>
parents:
214
diff
changeset
|
1489 Form xmlOutput = new FrmXmlExport(CurrentArmy); |
c47094612bac
Re #355: Add XML export format that can be transformed with an XSL
IBBoard <dev@ibboard.co.uk>
parents:
214
diff
changeset
|
1490 xmlOutput.ShowDialog(this); |
c47094612bac
Re #355: Add XML export format that can be transformed with an XSL
IBBoard <dev@ibboard.co.uk>
parents:
214
diff
changeset
|
1491 } |
221
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
1492 |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
1493 private void miEditArmy_Click(object sender, EventArgs e) |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
1494 { |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
1495 FrmEditArmy editArmy = new FrmEditArmy(commandStack, CurrentArmy); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
1496 editArmy.ShowDialog(this); |
5233147ca7e4
Re #101: Make army names and sizes modifiable after creation
IBBoard <dev@ibboard.co.uk>
parents:
217
diff
changeset
|
1497 } |
241
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1498 |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1499 private void AddDataFile_Click(object sender, EventArgs e) |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1500 { |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1501 OpenFileDialog addDataFileDialog = new OpenFileDialog(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1502 addDataFileDialog.Filter = "data files|*.system;*.race"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1503 addDataFileDialog.Title = "add data files"; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1504 addDataFileDialog.CheckFileExists = true; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1505 addDataFileDialog.Multiselect = true; |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1506 DialogResult dr = addDataFileDialog.ShowDialog(this); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1507 |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1508 if (dr == DialogResult.OK) |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1509 { |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1510 foreach (string filePath in addDataFileDialog.FileNames) |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1511 { |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1512 WarFoundryLoader.AddNewDataFile(filePath); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1513 } |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1514 |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1515 WarFoundryLoader.GetDefault().LoadFiles(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1516 } |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1517 |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1518 addDataFileDialog.Dispose(); |
e532d2f51ff0
Re #417: Make installation/first use easier
IBBoard <dev@ibboard.co.uk>
parents:
238
diff
changeset
|
1519 } |
142 | 1520 } |
1521 } |