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