コード例 #1
0
 static void PlayMp3()
 {
     //FileInfo[] fileInfos = Utility.GetFiles(@"d:\music", "*.mp3");
     MyMedia player = new MyMedia();
     player.FileName = @"D:\Music\孙燕姿《经典全纪录 主打精华版》[224kbps VBR]\07.害怕.mp3";
     player.Play();
     Console.ReadLine();
 }
コード例 #2
0
 private void Open(string fileName)
 {
     myclass = new MyMedia();
     myclass.FileName = fileName;
     this.trackBar1.Maximum = myclass.TotalSeconds;
 }
コード例 #3
0
 static void PlayMp3()
 {
     //FileInfo[] fileInfos = Utility.GetFiles(@"d:\music", "*.mp3");
     MyMedia player = new MyMedia();
     player.FileName = @"D:\Music\孙燕姿《经典全纪录 主打精华版》[224kbps VBR]\07.害怕.mp3";
     player.Play();
     Console.ReadLine();
     //foreach (FileInfo fileInfo in fileInfos)
     //{
     //    Console.WriteLine(fileInfo.FullName);
     //    player.FileName = fileInfo.FullName;
     //    Console.WriteLine(player.Duration);
     //    player.Play();
     //    Console.WriteLine(player.Duration);
     //    Thread.Sleep(10000); // ten seconds
     //    player.Puase();
     //    Thread.Sleep(10000); // ten seconds
     //    player.Stop();
     //    Thread.Sleep(20000);
     //}
 }