Ejemplo n.º 1
0
 public bool ReadWaveInfo(string filename)
 {
     try
     {
         using (StreamReader reader = new StreamReader(filename))
         {
             waveInfo = (WaveInfo) new XmlSerializer(typeof(WaveInfo)).Deserialize(reader.BaseStream);
         }
         return(true);
     }
     catch (Exception e)
     {
         // If we've caught an exception, output an error message
         // describing the error
         Console.WriteLine("ERROR: XML File could not be deserialized!");
         Console.WriteLine("Exception Message: " + e.Message);
         return(false);
     }
 }
Ejemplo n.º 2
0
        public WaveInfo ReadXML(string filename, int i = 0)
        {
            WaveInfo waveInfo;

            try
            {
                using (StreamReader reader = new StreamReader(filename))
                {
                    return(waveInfo = (WaveInfo) new XmlSerializer(typeof(WaveInfo)).Deserialize(reader.BaseStream));
                }
            }
            catch (Exception e)
            {
                // If we've caught an exception, output an error message
                // describing the error
                Console.WriteLine("ERROR: XML File could not be deserialized!");
                Console.WriteLine("Exception Message: " + e.Message);
                return(null);
            }
        }
Ejemplo n.º 3
0
 // Constructor
 public Loader()
 {
     waveInfo        = new WaveInfo();
     environmentInfo = new EnvironmentInfo();
     leaderBoard     = new LeaderBoard();
 }