Пример #1
0
        private void btConvertRDF_Click(object sender, EventArgs e)
        {
            if (listXML.CheckedItems.Count == 0)
            {
                MessageBox.Show("Check 1 more files!");
                return;
            }

            foreach (ListViewItem item in listXML.CheckedItems)
            {
                string rdfFileName = item.Text.Replace(".XML", ".rdf");
                rdfFileName = rdfFileName.Replace(".xml", ".rdf");
                string[]   fileNames  = new string[] { item.Text };
                ConvertRDF convertRDF = new ConvertRDF();
                convertRDF.ConvertToRDF(fileNames, rdfFileName);
            }

            lbInfoXML.Text = "Convert RDF Complete!";
        }
Пример #2
0
        private void btMergeRDF_Click(object sender, EventArgs e)
        {
            if (listXML.CheckedItems.Count == 0)
            {
                MessageBox.Show("Check 1 more files!");
                return;
            }

            string[] fileNames = new string[listXML.CheckedItems.Count];
            for (int i = 0; i < listXML.CheckedItems.Count; ++i)
            {
                fileNames[i] = listXML.CheckedItems[i].Text;
            }

            ConvertRDF convertRDF = new ConvertRDF();

            convertRDF.ConvertToRDF(fileNames, MH4Global.mergeRDFFileName);

            lbInfoXML.Text = "Merge to RDF Complete!";
        }