Пример #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            string        workDir     = Environment.CurrentDirectory;
            DirectoryInfo workDirInfo = new DirectoryInfo(workDir);
            string        xmlFilePath = workDirInfo.FullName + @"\_output.xml";

            Code.XmlReader xmlReader = new Code.XmlReader(xmlFilePath);
            _workDate = xmlReader.getWorkData();
        }
Пример #2
0
 public XmlReader(string xmlFilePath)
 {
     XmlDocument xmlDoc = new XmlDocument();
     xmlDoc.Load(xmlFilePath);
     XmlElement root = xmlDoc.DocumentElement;//取到根结点
     //输出配置
     string windowPath, outputPath, assetBundlePathTo, assetBundlePathFrom;
     windowPath = getFirstElement(root, "window").InnerText;
     outputPath = getFirstElement(root, "output").InnerText;
     assetBundlePathTo = getFirstElement(root, "assetBundleTo").InnerText;
     assetBundlePathFrom = getFirstElement(root, "assetBundleFrom").InnerText;
     _workData = new DataClass.WorkData(windowPath, outputPath, assetBundlePathTo, assetBundlePathFrom);
 }