# HG changeset patch # User Dan.Kulinski@dank-laptop.Global.Local # Date 1313354286 21600 # Node ID ac5f87626abdc152a87e6cb9e23826889f5ddfd4 # Parent 77043c3e0d941a174eaf3c77a9737ec46807f950 Basic XML translations diff -r 77043c3e0d94 -r ac5f87626abd FrmMain.cs --- a/FrmMain.cs Sun Aug 14 01:29:18 2011 +0000 +++ b/FrmMain.cs Sun Aug 14 14:38:06 2011 -0600 @@ -100,6 +100,7 @@ private ToolStripPanel toolStripPanel; private ToolStripSeparator toolStripSeparator4; private IBBToolStripMenuItem miPreferences; + private ToolStripMenuItem miExportArmyAsBasicXml; private IBBToolStripMenuItem miAbout; @@ -291,6 +292,7 @@ this.sbErrorPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel(); this.sbPointsPanel = new IBBoard.Windows.Forms.ColorableStatusBarPanel(); this.toolStripPanel = new System.Windows.Forms.ToolStripPanel(); + this.miExportArmyAsBasicXml = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip.SuspendLayout(); this.mainToolStrip.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.sbMainPanel)).BeginInit(); @@ -328,20 +330,20 @@ this.toolStripSeparator2, this.miExit}); this.menuFile.Name = "menuFile"; - this.menuFile.Size = new System.Drawing.Size(33, 20); + this.menuFile.Size = new System.Drawing.Size(35, 20); this.menuFile.Text = "&file"; // // miNewArmy // this.miNewArmy.Name = "miNewArmy"; - this.miNewArmy.Size = new System.Drawing.Size(164, 22); + this.miNewArmy.Size = new System.Drawing.Size(160, 22); this.miNewArmy.Text = "&new army"; this.miNewArmy.Click += new System.EventHandler(this.miNewArmy_Click); // // miOpenArmy // this.miOpenArmy.Name = "miOpenArmy"; - this.miOpenArmy.Size = new System.Drawing.Size(164, 22); + this.miOpenArmy.Size = new System.Drawing.Size(160, 22); this.miOpenArmy.Text = "&open army"; this.miOpenArmy.Click += new System.EventHandler(this.miOpenArmy_Click); // @@ -349,7 +351,7 @@ // this.miSaveArmy.Enabled = false; this.miSaveArmy.Name = "miSaveArmy"; - this.miSaveArmy.Size = new System.Drawing.Size(164, 22); + this.miSaveArmy.Size = new System.Drawing.Size(160, 22); this.miSaveArmy.Text = "&save army"; this.miSaveArmy.Click += new System.EventHandler(this.miSaveArmy_Click); // @@ -357,23 +359,24 @@ // this.miSaveArmyAs.Enabled = false; this.miSaveArmyAs.Name = "miSaveArmyAs"; - this.miSaveArmyAs.Size = new System.Drawing.Size(164, 22); + this.miSaveArmyAs.Size = new System.Drawing.Size(160, 22); this.miSaveArmyAs.Text = "save army &as..."; this.miSaveArmyAs.Click += new System.EventHandler(this.miSaveArmyAs_Click); // // miExportArmyAs // this.miExportArmyAs.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.miExportArmyAsBasicHTML}); + this.miExportArmyAsBasicHTML, + this.miExportArmyAsBasicXml}); this.miExportArmyAs.Enabled = false; this.miExportArmyAs.Name = "miExportArmyAs"; - this.miExportArmyAs.Size = new System.Drawing.Size(164, 22); + this.miExportArmyAs.Size = new System.Drawing.Size(160, 22); this.miExportArmyAs.Text = "export army as..."; // // miExportArmyAsBasicHTML // this.miExportArmyAsBasicHTML.Name = "miExportArmyAsBasicHTML"; - this.miExportArmyAsBasicHTML.Size = new System.Drawing.Size(130, 22); + this.miExportArmyAsBasicHTML.Size = new System.Drawing.Size(152, 22); this.miExportArmyAsBasicHTML.Text = "&basic html"; this.miExportArmyAsBasicHTML.Click += new System.EventHandler(this.miExportArmyAsBasicHTML_Click); // @@ -381,31 +384,31 @@ // this.miCloseArmy.Enabled = false; this.miCloseArmy.Name = "miCloseArmy"; - this.miCloseArmy.Size = new System.Drawing.Size(164, 22); + this.miCloseArmy.Size = new System.Drawing.Size(160, 22); this.miCloseArmy.Text = "&close army"; this.miCloseArmy.Click += new System.EventHandler(this.miCloseArmy_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(161, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(157, 6); // // miReloadFiles // this.miReloadFiles.Name = "miReloadFiles"; - this.miReloadFiles.Size = new System.Drawing.Size(164, 22); + this.miReloadFiles.Size = new System.Drawing.Size(160, 22); this.miReloadFiles.Text = "&reload files"; this.miReloadFiles.Click += new System.EventHandler(this.miReloadFiles_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(161, 6); + this.toolStripSeparator2.Size = new System.Drawing.Size(157, 6); // // miExit // this.miExit.Name = "miExit"; - this.miExit.Size = new System.Drawing.Size(164, 22); + this.miExit.Size = new System.Drawing.Size(160, 22); this.miExit.Text = "e&xit"; this.miExit.Click += new System.EventHandler(this.miExit_Click); // @@ -417,14 +420,14 @@ this.toolStripSeparator4, this.miPreferences}); this.menuEdit.Name = "menuEdit"; - this.menuEdit.Size = new System.Drawing.Size(36, 20); + this.menuEdit.Size = new System.Drawing.Size(39, 20); this.menuEdit.Text = "&edit"; // // miUndo // this.miUndo.Enabled = false; this.miUndo.Name = "miUndo"; - this.miUndo.Size = new System.Drawing.Size(142, 22); + this.miUndo.Size = new System.Drawing.Size(135, 22); this.miUndo.Text = "&undo"; this.miUndo.Click += new System.EventHandler(this.miUndo_Click); // @@ -432,19 +435,19 @@ // this.miRedo.Enabled = false; this.miRedo.Name = "miRedo"; - this.miRedo.Size = new System.Drawing.Size(142, 22); + this.miRedo.Size = new System.Drawing.Size(135, 22); this.miRedo.Text = "&redo"; this.miRedo.Click += new System.EventHandler(this.miRedo_Click); // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(139, 6); + this.toolStripSeparator4.Size = new System.Drawing.Size(132, 6); // // miPreferences // this.miPreferences.Name = "miPreferences"; - this.miPreferences.Size = new System.Drawing.Size(142, 22); + this.miPreferences.Size = new System.Drawing.Size(135, 22); this.miPreferences.Text = "&preferences"; this.miPreferences.Click += new System.EventHandler(this.miPreferences_Click); // @@ -453,13 +456,13 @@ this.menuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.miAbout}); this.menuHelp.Name = "menuHelp"; - this.menuHelp.Size = new System.Drawing.Size(39, 20); + this.menuHelp.Size = new System.Drawing.Size(42, 20); this.menuHelp.Text = "&help"; // // miAbout // this.miAbout.Name = "miAbout"; - this.miAbout.Size = new System.Drawing.Size(109, 22); + this.miAbout.Size = new System.Drawing.Size(105, 22); this.miAbout.Text = "&about"; this.miAbout.Click += new System.EventHandler(this.miAbout_Click); // @@ -475,7 +478,7 @@ this.bttnRedo}); this.mainToolStrip.Location = new System.Drawing.Point(0, 24); this.mainToolStrip.Name = "mainToolStrip"; - this.mainToolStrip.Size = new System.Drawing.Size(182, 25); + this.mainToolStrip.Size = new System.Drawing.Size(151, 25); this.mainToolStrip.TabIndex = 8; // // bttnNewArmy @@ -556,8 +559,8 @@ this.statusBar.ShowPanels = true; this.statusBar.Size = new System.Drawing.Size(790, 22); this.statusBar.TabIndex = 1; + this.statusBar.DrawItem += new System.Windows.Forms.StatusBarDrawItemEventHandler(this.statusBar_DrawItem); this.statusBar.PanelClick += new System.Windows.Forms.StatusBarPanelClickEventHandler(this.statusBar_PanelClick); - this.statusBar.DrawItem += new System.Windows.Forms.StatusBarDrawItemEventHandler(this.statusBar_DrawItem); // // sbMainPanel // @@ -591,6 +594,13 @@ this.toolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.toolStripPanel.Size = new System.Drawing.Size(790, 0); // + // miExportArmyAsBasicXml + // + this.miExportArmyAsBasicXml.Name = "miExportArmyAsBasicXml"; + this.miExportArmyAsBasicXml.Size = new System.Drawing.Size(152, 22); + this.miExportArmyAsBasicXml.Text = "basic xm&l"; + this.miExportArmyAsBasicXml.Click += new System.EventHandler(this.miExportArmyAsBasicXml_Click); + // // FrmMain // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); @@ -1421,5 +1431,22 @@ FrmPreferences prefsForm = new FrmPreferences(Preferences); prefsForm.Show(this); } + + private void miExportArmyAsBasicXml_Click(object sender, EventArgs e) + { + SaveFileDialog dialog = new SaveFileDialog(); + dialog.Filter = Translation.GetTranslation("armyExportBasicXmlFilter", "XML pages") + "|*.xml"; + dialog.Title = Translation.GetTranslation("exportArmyDialog", "Export army"); + + DialogResult dr = dialog.ShowDialog(this); + + if (dr == DialogResult.OK) + { + Army army = CurrentArmy; + string filePath = dialog.FileName; + log.DebugFormat("Exporting {0} to {1} as basic XML", army.Name, filePath); + WarFoundryXmlWithXslExporter.GetDefault().ExportArmy(army, filePath); + } + } } } diff -r 77043c3e0d94 -r ac5f87626abd FrmMain.resx --- a/FrmMain.resx Sun Aug 14 01:29:18 2011 +0000 +++ b/FrmMain.resx Sun Aug 14 14:38:06 2011 -0600 @@ -112,36 +112,36 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 17, 17 - + 122, 17 - + 334, 17 - + 438, 17 - + 573, 17 - + 835, 17 - + 17, 54 - + 138, 54 - + AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAA diff -r 77043c3e0d94 -r ac5f87626abd translations/en.translation --- a/translations/en.translation Sun Aug 14 01:29:18 2011 +0000 +++ b/translations/en.translation Sun Aug 14 14:38:06 2011 -0600 @@ -9,6 +9,7 @@ Save army &as... &Export army Basic HTML + Basic XML &Close army &Reload files E&xit