예제 #1
0
        public static void GenerateTestAudioXML()
        {
            #region Audio.xml
            try
            {
                XmlSerializer serializer = new XmlSerializer(typeof(SoundPath[]));
                TextWriter    writer     = new StreamWriter(SOUND_FILENAME, false);

                SoundPath[] paths = new SoundPath[] { new SoundPath(SoundElement.Tone1, "path.ogg") };

                serializer.Serialize(writer, paths);
            }
            catch (Exception ex)
            {
                Console.WriteLine("GenerateTextXML ERROR: " + ex.Message);
            }
            #endregion

            #region Music.xml
            try
            {
                XmlSerializer serializer = new XmlSerializer(typeof(MusicPath[]));
                TextWriter    writer     = new StreamWriter(MUSIC_FILENAME, false);

                MusicPath[] paths = new MusicPath[] { new MusicPath(MusicElement.Microbia, "microbia.ogg") };

                serializer.Serialize(writer, paths);
            }
            catch (Exception ex)
            {
                Console.WriteLine("GenerateTextXML ERROR: " + ex.Message);
            }
            #endregion
        }
예제 #2
0
        public static void GenerateTestAudioXML()
        {
            #region Audio.xml
              try
              {
            XmlSerializer serializer = new XmlSerializer(typeof(SoundPath[]));
            TextWriter writer = new StreamWriter(SOUND_FILENAME, false);

            SoundPath[] paths = new SoundPath[] { new SoundPath(SoundElement.Tone1, "path.ogg") };

            serializer.Serialize(writer, paths);
              }
              catch (Exception ex)
              {
            Console.WriteLine("GenerateTextXML ERROR: " + ex.Message);
              }
              #endregion

              #region Music.xml
              try
              {
            XmlSerializer serializer = new XmlSerializer(typeof(MusicPath[]));
            TextWriter writer = new StreamWriter(MUSIC_FILENAME, false);

            MusicPath[] paths = new MusicPath[] { new MusicPath(MusicElement.Microbia, "microbia.ogg") };

            serializer.Serialize(writer, paths);
              }
              catch (Exception ex)
              {
            Console.WriteLine("GenerateTextXML ERROR: " + ex.Message);
              }
              #endregion
        }