private void btnExport_Click(object sender, EventArgs e) { ExportResultSetOptionsForm exporter = new ExportResultSetOptionsForm(); if (exporter.ShowDialog() == DialogResult.OK) { ISparqlResultsWriter writer = exporter.Writer; String file = exporter.File; try { writer.Save(this._results, file); MessageBox.Show("Successfully exported the SPARQL Results to the file '" + file + "'", "SPARQL Results Export Success", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show("An error occurred attempting to export the SPARQL Results:\n" + ex.Message, "SPARQL Results Export Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }