Example #1
0
        public void Load(string fileName)
        {
            _fileName = fileName;
            XmlSerializer serializer = new XmlSerializer(typeof(RehaulFactoryStationData));

            // A FileStream is needed to read the XML document.
            // Declare an object variable of the type to be deserialized.
            RehaulFactoryStationData rehaulData;

            // Use the Deserialize method to restore the object's state with
            // data from the XML document.
            using (FileStream fs = new FileStream(fileName, FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read)) {
                rehaulData = (RehaulFactoryStationData)serializer.Deserialize(fs);
            }

            this._factoryList = rehaulData.FactoryList;
        }
 public RehaulFactoryStationData()
 {
     _factoryList = new TFactoryList();
 }
        public void Load(string fileName)
        {
            _fileName = fileName;
            XmlSerializer serializer = new XmlSerializer(typeof(RehaulFactoryStationData));

            // A FileStream is needed to read the XML document.
            // Declare an object variable of the type to be deserialized.
            RehaulFactoryStationData rehaulData;

            // Use the Deserialize method to restore the object's state with
            // data from the XML document.
            using (FileStream fs = new FileStream(fileName, FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read)) {
                rehaulData = (RehaulFactoryStationData)serializer.Deserialize(fs);
            }

            this._factoryList = rehaulData.FactoryList;
        }
Example #4
0
 public RehaulFactoryStationData()
 {
     _factoryList = new TFactoryList();
 }