Exemple #1
0
        public static void LoadTechTreeFromXmlForTools(string filename, ref TechTree tt)
        {
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.Load(filename);
            tt.LoadFromXmlNode(xmlDocument["TechTree"]);
        }
Exemple #2
0
        public static void LoadTechTreeFromXml(string filename, ref TechTree tt)
        {
            XmlDocument document = new XmlDocument();

            document.Load(ScriptHost.FileSystem, filename);
            tt.LoadFromXmlNode(document["TechTree"]);
        }
Exemple #3
0
        public static void SaveTechTreeToXmlForTools(string filename, TechTree tt)
        {
            XmlDocument xmlDocument = new XmlDocument();
            XmlElement  element     = xmlDocument.CreateElement("TechTree");

            tt.AttachToXmlNode(ref element);
            xmlDocument.AppendChild((XmlNode)element);
            xmlDocument.Save(filename);
        }