Example #1
0
 private void btnExportMetadata_Click(object sender, EventArgs e)
 {
     SaveFileDialog fileBrowserDialog1 = new SaveFileDialog();
     fileBrowserDialog1.DefaultExt = "xml";
     fileBrowserDialog1.OverwritePrompt = true;
     fileBrowserDialog1.Filter = "XML file (*.xml)|*.txt|All files (*.*)|*.*";
     fileBrowserDialog1.Title = "Select the filename for definitions";
     if (fileBrowserDialog1.ShowDialog(this) == DialogResult.OK)
     {
         MetadataExporter exporter = new MetadataExporter(this.db);
         exporter.Save(fileBrowserDialog1.FileName);
     }
 }
Example #2
0
        private static void ExportDicOutput(string path, string outpath)
        {
            if (Directory.Exists(path) == false)
            {
                throw new Exception("Input directory not found: " + path);
            }
            if (Directory.Exists(outpath))
            {
                ClearXMLs(outpath);
            }
            foreach (string file in Directory.GetFiles(path, "*.dic"))
            {
                RedatamDatabase db = new RedatamDatabase();
                db.OpenDictionary(file);

                MetadataExporter exp = new MetadataExporter(db);
                exp.Save(outpath + "\\" + Path.GetFileNameWithoutExtension(file) + ".xml");
            }
        }