Example #1
0
        public static void LoadStarmapFromXml(string filename, ref Starmap s)
        {
            XmlDocument document = new XmlDocument();

            document.Load(ScriptHost.FileSystem, filename);
            s.LoadFromXmlNode(document["Starmap"]);
        }
Example #2
0
        public static void SaveStarmapToXmlForTools(string filename, Starmap s)
        {
            XmlDocument xmlDocument = new XmlDocument();
            XmlElement  element     = xmlDocument.CreateElement("Starmap");

            s.AttachToXmlNode(ref element);
            xmlDocument.AppendChild((XmlNode)element);
            xmlDocument.Save(filename);
        }
Example #3
0
        public static void LoadStarmapFromXmlForTools(string filename, ref Starmap s)
        {
            if (!File.Exists(filename))
            {
                return;
            }
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.Load(filename);
            s.LoadFromXmlNode(xmlDocument["Starmap"]);
        }