diff FrmExportXml.cs @ 122:2479414b16f6

Re #361: Add XML output to GTK GUI * Add initial form and load XSLT file list
author IBBoard <dev@ibboard.co.uk>
date Tue, 27 Sep 2011 21:01:49 +0100
parents
children a647afc19fe9
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FrmExportXml.cs	Tue Sep 27 21:01:49 2011 +0100
@@ -0,0 +1,34 @@
+// This file (FrmExportXml.cs) is a part of the IBBoard.WarFoundry.GUI.GTK project and is copyright 2011 IBBoard
+// 
+// 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.
+using System;
+using System.IO;
+using IBBoard.GtkSharp;
+using System.Collections.Generic;
+
+namespace IBBoard.WarFoundry.GUI.GTK
+{
+	public partial class FrmExportXml : Gtk.Dialog
+	{
+		public FrmExportXml()
+		{
+			this.Build();
+			FillXsltList();
+		}
+
+		private void FillXsltList()
+		{
+			DirectoryInfo dir = new DirectoryInfo(System.IO.Path.Combine(Constants.ExecutablePath, "xsl"));
+			List<FileInfo> files = new List<FileInfo>(dir.GetFiles("*.xsl"));
+			ComboBoxUtils.FillCombo(transformList, files, delegate(FileInfo file) { return file.Name; });
+		}
+
+		protected void OnDoTransformWidgetToggled (object sender, System.EventArgs e)
+		{
+			bool enabled = doTransformWidget.Active;
+			lblTransform.Sensitive = enabled;
+			transformList.Sensitive = enabled;
+		}
+	}
+}
+