在 WebClient 请求期间发生异常
第一次点击listv的一项正常播放音乐,再点击另一首就崩溃了
private void listView1_MouseClick(object sender, MouseEventArgs e)
{
itemCurrent = listView1.GetItemAt(e.X, e.Y);
filePath = itemCurrent.SubItems[5].Text.ToString();
axWindowsMediaPlayer1.URL = filePath;
axWindowsMediaPlayer1.Ctlcontrols.play();
strsFilePath = filePath.Split('/');
fileName = strsFilePath.Last().Trim();
filePathLocalDirectory = @"C:\Users\逍遥\Desktop\wav\";
filePathLocal = filePathLocalDirectory + fileName;
webClient = new WebClient();
webClient.DownloadFile(filePath, filePathLocal);
wave = new WaveFile(filePathLocal);
wave.Read();
m_DrawWave = true;
Refresh();
webClient.Dispose();
}