如题。。。希望大家能够帮我度过漫长煎熬的起步时期。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args);
private void ButPlay_Click(object sender,EventArgs e)
{
this.axWindowsMediaPlayer1.URL=this.optFileName;
}
private void ButStop_Click(object sender,EventArgs e)
{
this.axWindousMediaPlayer1.Ctlcontrol.stop();
}
private void ButPause_Click(object sender,EventArgs e)
{
if(this.ButPause_Click.Text="暂停(&A)")
{
this.axWindowsMediaPlayer1.Culcontrols.pause();
this.ButPause_Click.Text="继续(&A)";
}
else
{
this.axWindowsMediaPlayer1.Ctlcontrols.play();
this.ButPause_Click.Text="暂停(&A)";
}
}
private WMPLib.WindowsMediaPlayerClass c;
private WMPLib.IWMPMedia m;
private void ButInfo_Click(object sender,EventArgs e)
{
if(this.optFile.FileName!="optFile")
{
c=new WMPLib.WindowsMediaPlayerClass();
m=c.newMedia(this.optfile.FileName);
MessageBox.Show("歌手名:"+m.getItemInfo("Author")+"\r\n"+"歌名:"+m.getItemInfo("Title"));
}
}
}
}