コード例 #1
0
 public XmlParser(World world, string xmlFile) : this(xmlFile)
 {
     World = world;
     string xmlPlusFile = xmlFile.Replace(".xml", "_plus.xml");
     if (File.Exists(xmlPlusFile))
     {
         _xmlPlusParser = new XmlPlusParser(world, xmlPlusFile);
         World.Log.AppendLine("Found LEGENDS_PLUS.XML!");
         World.Log.AppendLine("Parsed additional data...\n");
     }
     else
     {
         World.Log.AppendLine("Missing LEGENDS_PLUS.XML!");
         World.Log.AppendLine("Use DFHacks' \"exportlegends info\" if available...\n");
     }
 }
コード例 #2
0
 public XmlParser(BackgroundWorker worker, World world, string xmlFile, string xmlPlusFile) : this(xmlFile)
 {
     _worker = worker;
     World   = world;
     _worker.ReportProgress(0, "Parsing XML Sections...");
     if (xmlPlusFile != xmlFile && File.Exists(xmlPlusFile))
     {
         _xmlPlusParser = new XmlPlusParser(worker, world, xmlPlusFile);
         World.Log.AppendLine("Found LEGENDS_PLUS.XML!");
         World.Log.AppendLine("Parsed additional data...\n");
     }
     else
     {
         World.Log.AppendLine("Missing LEGENDS_PLUS.XML!");
         World.Log.AppendLine("Use DFHacks' \"exportlegends info\" if available...\n");
     }
 }