comparison FrmXmlExport.cs @ 213:f57957fe9009 xml-export-ui

UI Dialog for XML output
author Dan.Kulinski@dank-laptop.Global.Local
date Sun, 14 Aug 2011 23:04:42 -0600
parents
children a6ce13e4ae89
comparison
equal deleted inserted replaced
212:256f2f2f6e8c 213:f57957fe9009
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Data;
5 using System.Drawing;
6 using System.Linq;
7 using System.Text;
8 using System.Windows.Forms;
9 using IBBoard.WarFoundry.API.Objects;
10 using IBBoard.WarFoundry.API.Exporters;
11
12 namespace IBBoard.WarFoundry.GUI.WinForms
13 {
14 public partial class FrmXmlExport : Form
15 {
16 Army myArmy = null;
17 public FrmXmlExport(Army army)
18 {
19 InitializeComponent();
20 myArmy = army;
21 }
22
23 private void ibbLabel1_Click(object sender, EventArgs e)
24 {
25
26 }
27
28 private void FrmXmlExport_Load(object sender, EventArgs e)
29 {
30
31 }
32
33 private void checkBox1_CheckedChanged(object sender, EventArgs e)
34 {
35
36 }
37
38 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
39 {
40
41 }
42
43 private void bttnOutputSelect_Click(object sender, EventArgs e)
44 {
45 SaveFileDialog sfd = new SaveFileDialog();
46 sfd.Filter = "XML File|*.xml|HTML File|*.html|XHTML File|*.xhtml";
47 sfd.Title = "Save XML output";
48 sfd.ShowDialog();
49
50 if (sfd.FileName != "")
51 {
52 tbOutputFile.Text = sfd.FileName;
53 }
54 }
55
56 private void bttnCancel_Click(object sender, EventArgs e)
57 {
58 this.DialogResult = DialogResult.Cancel;
59 this.Hide();
60 }
61
62 private void bttnExport_Click(object sender, EventArgs e)
63 {
64 if (cbApplyTransform.Checked)
65 {
66 }
67 else
68 {
69 WarFoundryXmlWithXslExporter.GetDefault().ExportArmy(myArmy, tbOutputFile.Text);
70 }
71
72 this.DialogResult = DialogResult.OK;
73 }
74
75 private void tbOutputFile_Change(object sender, EventArgs e)
76 {
77 if (tbOutputFile.Text != "")
78 {
79 bttnExport.Enabled = true;
80 }
81 else
82 {
83 bttnExport.Enabled = false;
84 }
85 }
86 }
87 }