/// <summary> /// Sets the Flex Area and Tool and executes the Run export /// </summary> /// <param name="areaChoice">Area to choose</param> /// <param name="toolChoice">Tool to choose</param> /// <param name="exportFormat">Part of path for format of file to export</param> protected bool ContentsExists(string areaChoice, string toolChoice, string exportFormat) { if (!ChangeAreaTool(areaChoice, toolChoice)) { return(false); } Mediator mediator = exportDialog.Mediator; DeExportDialog ed = new DeExportDialog(mediator); ed.Show(); ed.Visible = false; return(ed.SelectItem(exportFormat)); }
/// <summary> /// Sets the Flex Area and Tool and executes the Run export /// </summary> /// <param name="areaChoice">Area to choose</param> /// <param name="toolChoice">Tool to choose</param> /// <param name="exportFormat">Part of path for format of file to export</param> /// <param name="filePath">path for file to export</param> protected void ExportTool(string areaChoice, string toolChoice, string exportFormat, string filePath) { if (File.Exists(filePath)) { File.Delete(filePath); } if (!ChangeAreaTool(areaChoice, toolChoice)) { return; } exportDialog.PropTable.SetProperty("ExportDir", Path.GetDirectoryName(filePath), true); exportDialog.PropTable.SetPropertyPersistence("ExportDir", true); using (DeExportDialog ed = new DeExportDialog(exportDialog.Mediator, exportDialog.PropTable)) { ed.Show(); ed.Visible = false; if (ed.SelectItem(exportFormat)) { ed.DeDoExport(filePath); } } }