MyMediaPlayer窗体
public static string path = "";//记录文件完整路径
string duration = "";//当前文件播放的时间
int width = 0;//播放文件的宽度
int height = 0;//播放文件的高度
//存放路径key为文件名,value为完整路径
private Dictionary<string, string> pathList = new Dictionary<string,string>();
private void 打开文件ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.OpenFile();
//清除播放列表中所有的值
this.listView1.Items.Clear();
//清除集合
pathList.Clear();
//添加到Listview中
listViewUpdate(Path.GetFileName(path), path);
//播放
axWmp.URL = path;