private void OnExportToXmlForInDesign(object sender, EventArgs e)
{
using(var d = new InDesignXmlInformationDialog())
{
d.ShowDialog();
}
using (var dlg = new SaveFileDialog())
{
dlg.FileName = Path.GetFileNameWithoutExtension(SelectedBook.GetPathHtmlFile())+".xml";
dlg.InitialDirectory = SelectedBook.FolderPath;
if(DialogResult.OK == dlg.ShowDialog())
{
try
{
_model.ExportInDesignXml(dlg.FileName);
PathUtilities.SelectFileInExplorer(dlg.FileName);
Analytics.Track("Exported XML For InDesign");
}
catch (Exception error)
{
SIL.Reporting.ErrorReport.NotifyUserOfProblem(error, "Could not export the book to XML");
Analytics.ReportException(error);
}
}
}
}