protected bool ContentsExists(string areaChoice, string toolChoice, string exportFormat) { if (!ChangeAreaTool(areaChoice, toolChoice)) return false; Mediator mediator = exportDialog.Mediator; using (DeExportDialog ed = new DeExportDialog(mediator)) { ed.Show(); ed.Visible = false; return ed.SelectItem(exportFormat); } }
protected void ExportTool(string areaChoice, string toolChoice, string exportFormat, string filePath) { if (File.Exists(filePath)) File.Delete(filePath); if (!ChangeAreaTool(areaChoice, toolChoice)) return; Mediator mediator = exportDialog.Mediator; mediator.PropertyTable.SetProperty("ExportDir", Path.GetDirectoryName(filePath)); mediator.PropertyTable.SetPropertyPersistence("ExportDir", true); using (DeExportDialog ed = new DeExportDialog(mediator)) { ed.Show(); ed.Visible = false; if (ed.SelectItem(exportFormat)) ed.DeDoExport(filePath); } }