生成报告axMediaPlayer并不包含GetMediaInfoString的定义
axMediaPlayer并不包含MpMediaInfoType的定义
下面是浏览按钮代码,错误用红色标注,请帮忙分析下如何改正,谢谢!private void button1_Click(object sender, EventArgs e)
{
if(this.openFileDialog1.ShowDialog()==DialogResult.OK)
{
this.listView1.Items.Clear();
string[] FileNames = this.openFileDialog1.FileNames;
foreach (string FileName in FileNames)
{
FileInfo MyFileInfo = new FileInfo(FileName);
float MyFileSize = (float)MyFileInfo.Length / (1024 * 1024);
this.axWindowsMediaPlayer1.Name = FileName;
string MyAuthor = this.axWindowsMediaPlayer1.GetMediaInfoString(axWindowsMediaPlayer1.MpMediaInfoType.mpClipAuthor);
string MyShortFileName = FileName.Substring(FileName.LastIndexOf("\\") + 1);
MyShortFileName = MyShortFileName.Substring(0, MyShortFileName.Length - 4);
string[] SubItem ={ MyShortFileName, MyAuthor, MyFileSize.ToString().Substring(0, 4) + "M", FileName };
ListViewItem Item = new ListViewItem(SubItem);
this.listView1.Items.Add(Item);
this.listView1.Items[0].Selected = true;
}
}
}
axMediaPlayer并不包含MpMediaInfoType的定义
下面是浏览按钮代码,错误用红色标注,请帮忙分析下如何改正,谢谢!private void button1_Click(object sender, EventArgs e)
{
if(this.openFileDialog1.ShowDialog()==DialogResult.OK)
{
this.listView1.Items.Clear();
string[] FileNames = this.openFileDialog1.FileNames;
foreach (string FileName in FileNames)
{
FileInfo MyFileInfo = new FileInfo(FileName);
float MyFileSize = (float)MyFileInfo.Length / (1024 * 1024);
this.axWindowsMediaPlayer1.Name = FileName;
string MyAuthor = this.axWindowsMediaPlayer1.GetMediaInfoString(axWindowsMediaPlayer1.MpMediaInfoType.mpClipAuthor);
string MyShortFileName = FileName.Substring(FileName.LastIndexOf("\\") + 1);
MyShortFileName = MyShortFileName.Substring(0, MyShortFileName.Length - 4);
string[] SubItem ={ MyShortFileName, MyAuthor, MyFileSize.ToString().Substring(0, 4) + "M", FileName };
ListViewItem Item = new ListViewItem(SubItem);
this.listView1.Items.Add(Item);
this.listView1.Items[0].Selected = true;
}
}
}
http://hi.baidu.com/spt1985/blog/item/544bcdde42a7015cccbf1a09.html