public static XMLReader Instance()
 {
     if (instance == null)
     {
         instance = new XMLReader();
     }
     return(instance);
 }
Exemple #2
0
        private void openXMLFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            openFileDialog1.Filter = "XML files (*.xml)|*.xml";
            if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                richTextBoxShowXML.Clear();

                XMLReader xmlreader = XMLReader.Instance();
                xmlreader.Path = openFileDialog1.FileName;

                xmlreader.PrintDataXML += new PrintDataEventHandler(AppendRichBoxShowXML_Handler);
                xmlreader.PrintDataLog += new PrintDataEventHandler(AppendLogBox_Handler);

                xmlreader.CreateThread();
            }
        }