// Read Sound Text File
        //
        public List <Sound_File> Read_Text_File(string Text_Path)
        {
            FileStream   File      = new FileStream(Text_Path, FileMode.Open);
            StreamReader Read_File = new StreamReader(File);

            List <Sound_File> Sounds = new List <Sound_File>();

            int Number_Sound_File = int.Parse(Read_File.ReadLine());

            while (Read_File.Peek() != -1)
            {
                string Line = Read_File.ReadLine();

                string[] Split1 = Line.Split('.');

                string Sound_Name = Split1[0];

                string[] Split2 = Line.Split(' ');

                string[] Duration = Split2[1].Split(':');

                int Sound_Duration = int.Parse(Duration[0]) * 60 * 60 + int.Parse(Duration[1]) * 60 + int.Parse(Duration[2]);

                Sound_File Sound = new Sound_File(Sound_Name, Sound_Duration);

                Sounds.Add(Sound);
            }

            Read_File.Close();
            File.Close();

            return(Sounds);
        }
예제 #2
0
 // Set Folder List Of Sounds
 //
 public void Set_Sound(Sound_File Sound)
 {
     Sounds.Add(Sound);
 }