c# 在WebClient 请求期间发生异常

asdfghjkl0128 asdfghjkl0128 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
在 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();
}
...全文
评论 1
收藏 已收藏
分享
返回顶部
asdfghjkl0128
C# 111,128 成员 642,536 内容