コード例 #1
0
        public static void LoadShipSectionFromXmlForTools(string filename, ref ShipSection ss)
        {
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.Load(filename);
            ss.LoadFromXmlNode(xmlDocument["ShipSection"]);
        }
コード例 #2
0
        public static void LoadShipSectionFromXml(string filename, ref ShipSection ss)
        {
            XmlDocument document = new XmlDocument();

            document.Load(ScriptHost.FileSystem, filename);
            ss.LoadFromXmlNode(document["ShipSection"]);
        }
コード例 #3
0
        public static void SaveShipSectionToXmlForTools(string filename, ShipSection ss)
        {
            XmlDocument xmlDocument = new XmlDocument();
            XmlElement  element     = xmlDocument.CreateElement("ShipSection");

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