private void DoRunExport(string path) { ExportDefinition export; try { export = ExportDefinition.Load(_api, path); } catch { TaskDialogEx.Show(this, "Unable to load report", Text, TaskDialogCommonButtons.OK, TaskDialogIcon.Error); return; } using (var form = new ExportDefinitionForm(_api, Path.GetDirectoryName(path), Path.GetFileName(path), export)) { form.ShowDialog(this); } }
private void DoAddExport() { EntitySchema entity; using (var form = new SelectEntityForm(_api)) { if (form.ShowDialog(this) != DialogResult.OK) { return; } entity = form.SelectedEntity; } var export = new ExportDefinition { Entity = entity }; using (var form = new ExportDefinitionForm(_api, _fileBrowser.Directory, null, export)) { form.ShowDialog(this); } }