changeset 211:ac5f87626abd xml-basic

Basic XML translations
author Dan.Kulinski@dank-laptop.Global.Local
date Sun, 14 Aug 2011 14:38:06 -0600
parents 77043c3e0d94
children 256f2f2f6e8c
files FrmMain.cs FrmMain.resx translations/en.translation
diffstat 3 files changed, 61 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- 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);
+            }
+        }
 	}
 }
--- 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 @@
     <value>2.0</value>
   </resheader>
   <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="undoMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+  <metadata name="undoMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
-  <metadata name="redoMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+  <metadata name="redoMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>122, 17</value>
   </metadata>
-  <metadata name="mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+  <metadata name="mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>334, 17</value>
   </metadata>
-  <metadata name="openArmyDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+  <metadata name="openArmyDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>438, 17</value>
   </metadata>
-  <metadata name="saveArmyDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+  <metadata name="saveArmyDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>573, 17</value>
   </metadata>
-  <metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+  <metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>835, 17</value>
   </metadata>
-  <metadata name="mainToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+  <metadata name="mainToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 54</value>
   </metadata>
-  <metadata name="catToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+  <metadata name="catToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>138, 54</value>
   </metadata>
-  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAA
--- 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 @@
 	<translation id="miSaveArmyAs">Save army &amp;as...</translation>
 	<translation id="miExportArmyAs">&amp;Export army</translation>
 	<translation id="miExportArmyAsBasicHTML">Basic HTML</translation>
+  <translation id="miExportArmyAsBasicXml">Basic XML</translation>
 	<translation id="miCloseArmy">&amp;Close army</translation>
 	<translation id="miReloadFiles">&amp;Reload files</translation>
 	<translation id="miExit">E&amp;xit</translation>